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

TypeError: Client.__init__() missing 1 required positional argument: 'callback_api_version' #514

Closed
tsundvoll opened this issue Feb 16, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@tsundvoll
Copy link
Contributor

tsundvoll commented Feb 16, 2024

Describe the bug
Getting
TypeError: Client.__init__() missing 1 required positional argument: 'callback_api_version' at startup

Seems like the issue is origniating from an updated version of the paho mqtt library

from paho.mqtt.client import Client

where the Client class now has an required attribute callback_api_version.

To Reproduce
Steps to reproduce the behavior:
Start isar locally with python main.py with isar v1.16.10

Expected behavior
ISAR should start as normal

Screenshots

Exception ignored in: <function Client.__del__ at 0x7f0187bb2ef0>
Traceback (most recent call last):
  File "/opt/venv/lib/python3.10/site-packages/paho/mqtt/client.py", line 874, in __del__
    self._reset_sockets()
  File "/opt/venv/lib/python3.10/site-packages/paho/mqtt/client.py", line 1133, in _reset_sockets
    self._sock_close()
  File "/opt/venv/lib/python3.10/site-packages/paho/mqtt/client.py", line 1119, in _sock_close
    if not self._sock:
AttributeError: 'Client' object has no attribute '_sock'
Using environment variable for AZURE_CLIENT_ID
Traceback (most recent call last):
  File "/app/main.py", line 53, in <module>
    mqtt_client: MqttClient = MqttClient(mqtt_queue=queues.mqtt_queue)
  File "/opt/venv/lib/python3.10/site-packages/isar/services/service_connections/mqtt/mqtt_client.py", line 56, in __init__
    self.client: Client = Client()
TypeError: Client.__init__() missing 1 required positional argument: 'callback_api_version'

Old version:
image

New version:
image

@tsundvoll tsundvoll added the bug Something isn't working label Feb 16, 2024
@tsundvoll
Copy link
Contributor Author

Adressed in #515

@tsundvoll
Copy link
Contributor Author

Solved by #515 , closing issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant