Issues running both docker and legacy versions
Closed this issue · 1 comments
Ubuntu 22.04.2
Docker output
wyze_garmin_sync-wyzegarminconnect-1 | /wyze_garmin_sync /wyze_garmin_sync
wyze_garmin_sync-wyzegarminconnect-1 | Traceback (most recent call last):
wyze_garmin_sync-wyzegarminconnect-1 | File "/wyze_garmin_sync/scale.py", line 26, in
wyze_garmin_sync-wyzegarminconnect-1 | for device in client.devices_list():
wyze_garmin_sync-wyzegarminconnect-1 | ^^^^^^^^^^^^^^^^^^^^^
wyze_garmin_sync-wyzegarminconnect-1 | File "/usr/local/lib/python3.11/site-packages/wyze_sdk/api/client.py", line 225, in devices_list
wyze_garmin_sync-wyzegarminconnect-1 | return [DeviceParser.parse(device) for device in self._api_client().get_object_list()["data"]["device_list"]]
wyze_garmin_sync-wyzegarminconnect-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
wyze_garmin_sync-wyzegarminconnect-1 | File "/usr/local/lib/python3.11/site-packages/wyze_sdk/api/client.py", line 225, in
wyze_garmin_sync-wyzegarminconnect-1 | return [DeviceParser.parse(device) for device in self._api_client().get_object_list()["data"]["device_list"]]
wyze_garmin_sync-wyzegarminconnect-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
wyze_garmin_sync-wyzegarminconnect-1 | File "/usr/local/lib/python3.11/site-packages/wyze_sdk/models/devices/init.py", line 48, in parse
wyze_garmin_sync-wyzegarminconnect-1 | return Lock(**device)
wyze_garmin_sync-wyzegarminconnect-1 | ^^^^^^^^^^^^^^
wyze_garmin_sync-wyzegarminconnect-1 | File "/usr/local/lib/python3.11/site-packages/wyze_sdk/models/devices/locks.py", line 774, in init
wyze_garmin_sync-wyzegarminconnect-1 | self.lock_state = self._extract_lock_state(others)
wyze_garmin_sync-wyzegarminconnect-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
wyze_garmin_sync-wyzegarminconnect-1 | File "/usr/local/lib/python3.11/site-packages/wyze_sdk/models/devices/locks.py", line 833, in _extract_lock_state
wyze_garmin_sync-wyzegarminconnect-1 | return DeviceProp(definition=prop.definition, ts=prop.ts, value=not prop.value)
wyze_garmin_sync-wyzegarminconnect-1 | ^^^^^^^^^^^^^^^
wyze_garmin_sync-wyzegarminconnect-1 | AttributeError: 'NoneType' object has no attribute 'definition'
wyze_garmin_sync-wyzegarminconnect-1 | md5sum: /wyze_garmin_sync/cksum.txt: No such file or directory
wyze_garmin_sync-wyzegarminconnect-1 | Error: No valid files.
wyze_garmin_sync-wyzegarminconnect-1 | 2023-08-22 16:36:08,367 [WARNING] File '/wyze_garmin_sync/wyze_scale.fit' does not exist. Skipping...
wyze_garmin_sync-wyzegarminconnect-1 | file not uploaded
Legacy output
Traceback (most recent call last):
File "/home/brent/Documents/wyze_garmin_sync/./scale.py", line 26, in
for device in client.devices_list():
File "/home/brent/.local/lib/python3.10/site-packages/wyze_sdk/api/client.py", line 225, in devices_list
return [DeviceParser.parse(device) for device in self._api_client().get_object_list()["data"]["device_list"]]
File "/home/brent/.local/lib/python3.10/site-packages/wyze_sdk/api/client.py", line 225, in
return [DeviceParser.parse(device) for device in self._api_client().get_object_list()["data"]["device_list"]]
File "/home/brent/.local/lib/python3.10/site-packages/wyze_sdk/models/devices/init.py", line 48, in parse
return Lock(**device)
File "/home/brent/.local/lib/python3.10/site-packages/wyze_sdk/models/devices/locks.py", line 774, in init
self.lock_state = self._extract_lock_state(others)
File "/home/brent/.local/lib/python3.10/site-packages/wyze_sdk/models/devices/locks.py", line 833, in _extract_lock_state
return DeviceProp(definition=prop.definition, ts=prop.ts, value=not prop.value)
AttributeError: 'NoneType' object has no attribute 'definition'
md5sum: ./cksum.txt: No such file or directory
2023-08-22 16:39:32,563 [WARNING] File '/home/brent/Documents/wyze_garmin_sync/wyze_scale.fit' does not exist. Skipping...
Error: No valid files.
file not uploaded
Fixed issue by editing scale.py line 26 from client.devices_list() to client.scales.list()