Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: not enough values to unpack (expected 3, got 2) #21

Closed
zabuldon opened this issue Jan 19, 2018 · 11 comments
Closed

ValueError: not enough values to unpack (expected 3, got 2) #21

zabuldon opened this issue Jan 19, 2018 · 11 comments

Comments

@zabuldon
Copy link

We are expecting this issue again:
RouterOS: 6.40

File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik.py", line 137, in scan_devices
    self._update_info()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik.py", line 159, in _update_info
    device_names = self.client(cmd='/ip/dhcp-server/lease/getall')
  File "/srv/homeassistant/lib/python3.5/site-packages/librouteros/api.py", line 80, in __call__
    return self._readResponse()
  File "/srv/homeassistant/lib/python3.5/site-packages/librouteros/api.py", line 103, in _readResponse
    reply_word, words = self._readSentence()
  File "/srv/homeassistant/lib/python3.5/site-packages/librouteros/api.py", line 89, in _readSentence
    words = dict(self.parseWord(word) for word in words)
  File "/srv/homeassistant/lib/python3.5/site-packages/librouteros/api.py", line 89, in <genexpr>
    words = dict(self.parseWord(word) for word in words)
  File "/srv/homeassistant/lib/python3.5/site-packages/librouteros/api.py", line 34, in parseWord
    _, key, value = word.split('=', 2)
ValueError: not enough values to unpack (expected 3, got 2)
@luqasz
Copy link
Owner

luqasz commented Jan 19, 2018

Can you reproduce this in some way ?

@zabuldon
Copy link
Author

zabuldon commented Jan 19, 2018 via email

@luqasz
Copy link
Owner

luqasz commented Jan 19, 2018

Both issues occur only on 6.41 ?

@zabuldon
Copy link
Author

zabuldon commented Jan 19, 2018 via email

@zabuldon
Copy link
Author

zabuldon commented Jan 19, 2018 via email

@luqasz
Copy link
Owner

luqasz commented Jan 19, 2018

In 6.41 changelog.
*) dhcpv4-server - strip trailing "\0" in "hostname" if present;
Can you check what are exact leases when this happens ?

@luqasz
Copy link
Owner

luqasz commented Jan 29, 2018

@zabuldon I've fixed a bug in b1caed9. See if you still have any issues. Maybe both will be fixed.

@zabuldon
Copy link
Author

@luqasz was it merged to 1.0.5 release?
P.S.
I have ugly internet connection now, so can't review full commit log.

@luqasz
Copy link
Owner

luqasz commented Jan 31, 2018

was it merged to 1.0.5 release?

yes I did

@luqasz
Copy link
Owner

luqasz commented Feb 25, 2018

@zabuldon Any progress on this issue ?

@zabuldon
Copy link
Author

zabuldon commented Mar 3, 2018

Looks like it fixed

@luqasz luqasz closed this as completed Mar 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants