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

OreSatFile depends on GPIO and fails if real GPIO exist #27

Open
ThirteenFish opened this issue Oct 23, 2024 · 0 comments
Open

OreSatFile depends on GPIO and fails if real GPIO exist #27

ThirteenFish opened this issue Oct 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ThirteenFish
Copy link
Contributor

I was trying to run edl_file_upload.py on station.uniclogs.org and it failed with the following exception:

Traceback (most recent call last):
  File "/home/uniclogs/oresat-c3-software/scripts/./edl_file_upload.py", line 41, in <module>
    from olaf import OreSatFile
  File "/home/uniclogs/oresat-c3-software/.venv/lib/python3.11/site-packages/olaf/__init__.py", line 18, in <module>
    from .board.gpio import GPIO_HIGH, GPIO_IN, GPIO_LOW, GPIO_OUT, Gpio, GpioError
  File "/home/uniclogs/oresat-c3-software/.venv/lib/python3.11/site-packages/olaf/board/gpio.py", line 19, in <module>
    class Gpio:
  File "/home/uniclogs/oresat-c3-software/.venv/lib/python3.11/site-packages/olaf/board/gpio.py", line 34, in Gpio
    with open(f"{_GPIO_DIR_PATH}/{i}/label", "r") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/gpio/gpio595/label'

The script uses only OreSatFile and should not depend on the state of GPIO for successful import.

For reference:

uniclogs@ebv1-station:~/oresat-c3-software/scripts $ ls /sys/class/gpio
export   gpio584  gpio588  gpio592  gpio595  gpio598  gpiochip512  gpiochip586  unexport
gpio582  gpio585  gpio589  gpio593  gpio596  gpio599  gpiochip570  gpiochip594
gpio583  gpio587  gpio591  gpio594  gpio597  gpio601  gpiochip578  gpiochip602
@ThirteenFish ThirteenFish added the bug Something isn't working label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant