Closed tommy4111 closed 3 months ago
It should be fixed in my PR #9 which states this bug to the version bump of paho-mqtt.
@mattcar15 can you publish a new version that includes this fix ?
Hi, sorry I hadn't gotten a chance to release it until now. Just did https://pypi.org/project/bambu-connect/
C:\Users\chris\Downloads\bambu-connect-main\bambu-connect-main\examples>python file_list_and_gcode.py Exception ignored in: <function Client.del at 0x0000020CDD791000> Traceback (most recent call last): File "C:\Python310\lib\site-packages\paho\mqtt\client.py", line 874, in del self._reset_sockets() File "C:\Python310\lib\site-packages\paho\mqtt\client.py", line 1133, in _reset_sockets self._sock_close() File "C:\Python310\lib\site-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 "C:\Users\chris\Downloads\bambu-connect-main\bambu-connect-main\examples\file_list_and_gcode.py", line 36, in
main()
File "C:\Users\chris\Downloads\bambu-connect-main\bambu-connect-main\examples\file_list_and_gcode.py", line 14, in main
bambu_client = BambuClient(hostname, access_code, serial)
File "C:\Python310\lib\site-packages\bambu_connect\BambuClient.py", line 12, in init
self.watchClient = WatchClient(hostname, access_code, serial)
File "C:\Python310\lib\site-packages\bambu_connect\WatchClient.py", line 14, in init
self.client = self.setup_mqtt_client()
File "C:\Python310\lib\site-packages\bambu_connect\WatchClient.py", line 20, in setup_mqtt_client
client = mqtt.Client()
TypeError: Client.init() missing 1 required positional argument: 'callback_api_version'
Exception ignored in: <function BambuClient.del__ at 0x0000020CDD7A7F40>
Traceback (most recent call last):
File "C:\Python310\lib\site-packages\bambu_connect\BambuClient.py", line 17, in del__
self.executeClient.disconnect()
AttributeError: 'BambuClient' object has no attribute 'executeClient'