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

ImportError when trying to import LED from periphery module #69

Open
goodniuniu opened this issue Mar 6, 2024 · 0 comments
Open

ImportError when trying to import LED from periphery module #69

goodniuniu opened this issue Mar 6, 2024 · 0 comments

Comments

@goodniuniu
Copy link

Body:

Hello,

I've encountered an import error while trying to use the periphery library for controlling LEDs in a Python script. Below is the error message I received:

Traceback (most recent call last):
  File "/home/pico/github/epaper-with-raspberrypi/tmp/luckfox_led.py", line 1, in <module>
    from periphery import LED
ImportError: cannot import name 'LED' from 'periphery' (/home/pico/github/epaper-with-raspberrypi/venv/lib/python3.10/site-packages/periphery/__init__.py)

Steps to Reproduce:

  1. Create a Python script named luckfox_led.py with the following content:
    from periphery import LED
    # Additional code to manipulate LEDs
  2. Run the script using Python 3.10 in a virtual environment: python luckfox_led.py.

Expected Behavior:

The script should import the LED class from the periphery module without any issues, allowing further LED manipulation commands to be executed.

Actual Behavior:

An ImportError is raised, indicating that the LED class cannot be imported from the periphery module.

Environment:

  • Python version: 3.10
  • periphery version: [python-periphery 2.4.1]
  • Operating System: [Linux luckfox 5.10.110 Retry interrupted system calls #1 Fri Dec 29 14:34:18 HKT 2023 armv7l armv7l armv7l GNU/Linux]
  • Hardware: [luckfox pico max]

Any insights or solutions to resolve this import issue would be greatly appreciated. Thank you!


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

1 participant