This error happens immediately upon running the example code. Region is set to US, and client ID, client secret and device ID are all OK. PC is also connected to the same network as the bulb, if that is relevant.
Full error log:
Traceback (most recent call last):
File "c:\Users\XXX\Documents\CodingStudies\playground\python\smart-light-piano\main.py", line 9, in
bulb = Bulb(
^^^^^
File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\tuya_bulb_control\bulb.py", line 23, in init
super().init(
File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\tuya_bulb_control_tuya_api.py", line 25, in init
self.__access_token = self.token()
^^^^^^^^^^^^^^
File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\tuya_bulb_control_tuya_api.py", line 102, in token
raise AuthorizedError(
tuya_bulb_control.exceptions.AuthorizedError: 1004 -> Sign invalid
Hello!
This error happens immediately upon running the example code. Region is set to US, and client ID, client secret and device ID are all OK. PC is also connected to the same network as the bulb, if that is relevant.
Full error log: Traceback (most recent call last): File "c:\Users\XXX\Documents\CodingStudies\playground\python\smart-light-piano\main.py", line 9, in
bulb = Bulb(
^^^^^
File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\tuya_bulb_control\bulb.py", line 23, in init
super().init(
File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\tuya_bulb_control_tuya_api.py", line 25, in init
self.__access_token = self.token()
^^^^^^^^^^^^^^
File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\tuya_bulb_control_tuya_api.py", line 102, in token
raise AuthorizedError(
tuya_bulb_control.exceptions.AuthorizedError: 1004 -> Sign invalid