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 tofrom 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'
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'