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

Example Sucks script fails #112

Open
Nama opened this issue Mar 21, 2021 · 0 comments
Open

Example Sucks script fails #112

Nama opened this issue Mar 21, 2021 · 0 comments

Comments

@Nama
Copy link

Nama commented Mar 21, 2021

Describe the bug
If I run the script from here, I get this Traceback:

$ python scripts/sucks_bumper.py
Traceback (most recent call last):
  File "/home/kirika/scripts/sucks_bumper.py", line 21, in <module>
    vacbot = BumperVacBot(server_address)
  File "/home/kirika/scripts/sucks_bumper.py", line 10, in __init__
    super().__init__('sucks', 'ecouser.net', '', '', vacuum, '')
  File "/home/kirika/venv/sucks/lib/python3.9/site-packages/sucks/__init__.py", line 412, in __init__
    if not vacuum['iotmq']:
KeyError: 'iotmq'

And yeah, you can't check for non-existent keys in such way. Try-Except must be used there.

After force-trueing the if (if True:, since my robot uses XMPP), I get the following Traceback:

$ python scripts/sucks_bumper.py
Traceback (most recent call last):
  File "/home/kirika/scripts/sucks_bumper.py", line 21, in <module>
    vacbot = BumperVacBot(server_address)
  File "/home/kirika/scripts/sucks_bumper.py", line 10, in __init__
    super().__init__('sucks', 'ecouser.net', '', '', vacuum, '')
  File "/home/kirika/venv/sucks/lib/python3.9/site-packages/sucks/__init__.py", line 413, in __init__
    self.xmpp = EcoVacsXMPP(user, domain, resource, secret, continent, vacuum, server_address)
  File "/home/kirika/venv/sucks/lib/python3.9/site-packages/sucks/__init__.py", line 876, in __init__
    ClientXMPP.__init__(self, "{}@{}/{}".format(user, domain,resource), '0/' + resource + '/' + secret) #Init with resource to bind it
  File "/home/kirika/venv/sucks/lib/python3.9/site-packages/sleekxmppfs/clientxmpp.py", line 70, in __init__
    BaseXMPP.__init__(self, jid, 'jabber:client', **kwargs)
  File "/home/kirika/venv/sucks/lib/python3.9/site-packages/sleekxmppfs/basexmpp.py", line 69, in __init__
    self.requested_jid = JID(jid, cache_lock=True)
  File "/home/kirika/venv/sucks/lib/python3.9/site-packages/sleekxmppfs/jid.py", line 462, in __init__
    parsed_jid = _parse_jid(jid)
  File "/home/kirika/venv/sucks/lib/python3.9/site-packages/sleekxmppfs/jid.py", line 146, in _parse_jid
    raise InvalidJID('JID could not be parsed')
sleekxmppfs.jid.InvalidJID: JID could not be parsed

To Reproduce
Install bmartin's sucks and run the script.

Vacuum:

  • Model: OZMO 610

Additional context
The docs say only about Python 3.7. I've tested 3.7, too. Same behavior.

The robot connects to bumper successfully, but I couldn't make sucks nor the app connect to it. I also simply used the sucks script I use with EcoVacs servers. Only getting connection refused. I feel like #99 has something to do with it.

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

1 participant