Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'typing' has no attribute 'Literal' #50

Open
samwaseda opened this issue Sep 20, 2023 · 1 comment
Open

AttributeError: module 'typing' has no attribute 'Literal' #50

samwaseda opened this issue Sep 20, 2023 · 1 comment

Comments

@samwaseda
Copy link

When I installed pyauthenticator and executed it, I got the following message

Traceback (most recent call last):
  File "/opt/anaconda3/bin/pyauthenticator", line 6, in <module>
    from pyauthenticator.__main__ import command_line_parser
  File "/opt/anaconda3/lib/python3.7/site-packages/pyauthenticator/__init__.py", line 4, in <module>
    from pyauthenticator.share import (
  File "/opt/anaconda3/lib/python3.7/site-packages/pyauthenticator/share.py", line 7, in <module>
    import otpauth
  File "/opt/anaconda3/lib/python3.7/site-packages/otpauth/__init__.py", line 1, in <module>
    from .core import SupportedAlgorithms
  File "/opt/anaconda3/lib/python3.7/site-packages/otpauth/core.py", line 6, in <module>
    SupportedAlgorithms = t.Literal["SHA1", "SHA256", "SHA512"]
AttributeError: module 'typing' has no attribute 'Literal'
@jan-janssen
Copy link
Owner

This error is typically related to an outdated pyauthenticator version, maybe 0.0.7? Try using the more up to date version 0.2.0. The version 0.2.0 requires Python >=3.8 so if you are still using 3.7 this might be a reason why the old pyauthenticator version was installed. Unfortunately, the old version is broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants