Running spacemouse.py produces the following error:
$ python spacemouse.py
Traceback (most recent call last):
File "/home/rich/git/SpaceMouse/python/spacemouse.py", line 114, in <module>
client = connect_mqtt()
^^^^^^^^^^^^^^
File "/home/rich/git/SpaceMouse/python/spacemouse.py", line 51, in connect_mqtt
client = mqtt_client.Client(client_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rich/spacemouse/lib/python3.11/site-packages/paho/mqtt/client.py", line 772, in __init__
raise ValueError(
ValueError: Unsupported callback API version: version 2.0 added a callback_api_version, see docs/migrations.rst for details
Per this, line 51 should be modified as follows:
client = mqtt_client.Client(mqtt_client.CallbackAPIVersion.VERSION1, client_id)
Running spacemouse.py produces the following error:
$ python spacemouse.py
Per this, line 51 should be modified as follows:
client = mqtt_client.Client(mqtt_client.CallbackAPIVersion.VERSION1, client_id)