Skip to content

Cannot import in python 3.7 #76

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

Closed
Neradoc opened this issue May 19, 2022 · 0 comments · Fixed by #77
Closed

Cannot import in python 3.7 #76

Neradoc opened this issue May 19, 2022 · 0 comments · Fixed by #77

Comments

@Neradoc
Copy link

Neradoc commented May 19, 2022

>>> import adafruit_rfm9x
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pi/circuit/venv/lib/python3.7/site-packages/adafruit_rfm9x.py", line 142, in <module>
    class RFM9x:
  File "/home/pi/circuit/venv/lib/python3.7/site-packages/adafruit_rfm9x.py", line 265, in RFM9x
    crc: bool = True
NameError: name 'SPI' is not defined

The real exception, hidden by the typing try-except is the following:

  File "/home/pi/circuit/venv/lib/python3.7/site-packages/adafruit_rfm9x.py", line 31, in <module>
    from typing import Optional, Type, Literal
ImportError: cannot import name 'Literal' from 'typing' (/usr/lib/python3.7/typing.py)

Literal is in python 3.8.

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

Successfully merging a pull request may close this issue.

1 participant