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
When attempting to import this library on Python lower than 3.8, the following error will appear:
ImportError: cannot import name 'Literal' from 'typing' (/usr/lib/python3.7/typing.py)
This error was reproduced on 2 of my Raspberry Pis running Raspbian GNU/Linux 10 (buster).
There is fortunately a trivial fix. In utils.py change
from typing import Dict, Literal
to
from typing import Dict
from typing_extensions import Literal
Or put the current Literal import code in a try / except with the exception importing the 2nd way. I could make a pull request but figured this would be easier.
Thanks for the issue. It's 2 AM here for me and I'm in my bed trying to sleep. I'll have to fix this in about 2-3 hours when I get up to eat my Sehri. Sorry for the delay but I really need to sleep and can't use my PC now
Description of the bug
When attempting to import this library on Python lower than 3.8, the following error will appear:
ImportError: cannot import name 'Literal' from 'typing' (/usr/lib/python3.7/typing.py)
This error was reproduced on 2 of my Raspberry Pis running Raspbian GNU/Linux 10 (buster).
There is fortunately a trivial fix. In
utils.py
changeto
Or put the current
Literal
import code in a try / except with the exception importing the 2nd way. I could make a pull request but figured this would be easier.Steps To Reproduce
On Python < 3.8:
Additional Information
No response
The text was updated successfully, but these errors were encountered: