You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trying to run api.py from example, it shows the following errors:
File "api.py", line 2, in
from tuya_iot import TuyaOpenAPI, tuya_logger
File "C:\Users\yolo\AppData\Local\Programs\Python\Python37\lib\site-packages\tuya_iot_init_.py", line 2, in
from .device import TuyaDevice, TuyaDeviceListener, TuyaDeviceManager
File "C:\Users\yolo\AppData\Local\Programs\Python\Python37\lib\site-packages\tuya_iot\device.py", line 7, in
from typing import Any, Literal, Optional
ImportError: cannot import name 'Literal' from 'typing'
changing the import routes in device.py to from typing_extensions import Literal as suggested in stackoverflow gives the following error:
File "api.py", line 2, in
from tuya_iot import TuyaOpenAPI, tuya_logger
ImportError: cannot import name 'tuya_logger' from 'tuya_iot'
The text was updated successfully, but these errors were encountered:
trying to run api.py from example, it shows the following errors:
File "api.py", line 2, in
from tuya_iot import TuyaOpenAPI, tuya_logger
File "C:\Users\yolo\AppData\Local\Programs\Python\Python37\lib\site-packages\tuya_iot_init_.py", line 2, in
from .device import TuyaDevice, TuyaDeviceListener, TuyaDeviceManager
File "C:\Users\yolo\AppData\Local\Programs\Python\Python37\lib\site-packages\tuya_iot\device.py", line 7, in
from typing import Any, Literal, Optional
ImportError: cannot import name 'Literal' from 'typing'
changing the import routes in device.py to
from typing_extensions import Literal
as suggested in stackoverflow gives the following error:File "api.py", line 2, in
from tuya_iot import TuyaOpenAPI, tuya_logger
ImportError: cannot import name 'tuya_logger' from 'tuya_iot'
The text was updated successfully, but these errors were encountered: