rytilahti / python-eq3bt

Python library and command-line tool for eQ-3 Smart Bluetooth thermostats
MIT License
114 stars 36 forks source link

TypeError: locked() got multiple values for argument 'target' #30

Closed jempo closed 4 years ago

jempo commented 5 years ago

This problem is show when i connect to my device and show me this stacktrace.

[DEVICE-MAC] Target 16.0 (mode: auto dst, away: no)
Traceback (most recent call last):
  File "/srv/homeassistant/bin/eq3cli", line 10, in <module>
    sys.exit(cli())
  File "/srv/homeassistant/lib/python3.5/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/srv/homeassistant/lib/python3.5/site-packages/click/core.py", line 1114, in invoke
    return Command.invoke(self, ctx)
  File "/srv/homeassistant/lib/python3.5/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/srv/homeassistant/lib/python3.5/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/eq3bt/eq3cli.py", line 38, in cli
    ctx.invoke(state)
  File "/srv/homeassistant/lib/python3.5/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/eq3bt/eq3cli.py", line 161, in state
    ctx.invoke(locked, ctx)
  File "/srv/homeassistant/lib/python3.5/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
TypeError: locked() got multiple values for argument 'target'
rytilahti commented 4 years ago

I have seen that before with other projects, click (myabe 7+?) contains a breaking change so the code needs some adaptation to make it work again.

dakkil commented 4 years ago

Hi, I'm also affected by the issue. Please tell me if there's anything I can test to make it work. Thanks!

rytilahti commented 4 years ago

What's your click version? pip show click will show it, works fine for me here with 7.0. Please reopen if this is still an issue.