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

unable to run with current paho-mqtt version (2.0) #28

Open
dirstel opened this issue Feb 22, 2024 · 1 comment
Open

unable to run with current paho-mqtt version (2.0) #28

dirstel opened this issue Feb 22, 2024 · 1 comment

Comments

@dirstel
Copy link

dirstel commented Feb 22, 2024

current source is unable to run with current paho-mqtt version (2.0) - https://pypi.org/project/paho-mqtt/#history

Exception ignored in: <function Client.__del__ at 0x7fa23b524ca0>
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/paho/mqtt/client.py", line 874, in __del__
    self._reset_sockets()
  File "/usr/local/lib/python3.8/dist-packages/paho/mqtt/client.py", line 1133, in _reset_sockets
    self._sock_close()
  File "/usr/local/lib/python3.8/dist-packages/paho/mqtt/client.py", line 1119, in _sock_close
    if not self._sock:
AttributeError: 'Client' object has no attribute '_sock'
Traceback (most recent call last):
  File "modbus2mqtt.py", line 4, in <module>
    main()
  File "/root/spicierModbus2mqtt-master/modbus2mqtt/modbus2mqtt.py", line 427, in main
    asyncio.run(async_main(), debug=False)
  File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/root/spicierModbus2mqtt-master/modbus2mqtt/modbus2mqtt.py", line 571, in async_main
    mqc=mqtt.Client(client_id=clientid)
TypeError: __init__() missing 1 required positional argument: 'callback_api_version'

Quickfix: nail version to 1.6.1 in Dockerfile:
RUN pip install --root-user-action=ignore --no-cache-dir --upgrade paho-mqtt==1.6.1

@Yiivgeny
Copy link

+1

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