njbbaer / unicorn-remote

Control your Unicorn HAT LED matrix from the web
MIT License
38 stars 6 forks source link

Errno 2 No such file or directory #4

Closed unicornrobot closed 6 years ago

unicornrobot commented 6 years ago

Hi. Can you help with this error on an original unicornhat (8x8). Thanks

pi@Pi3-UniHat:~/unicorn-remote $ sudo python3 run.py -o Traceback (most recent call last): File "run.py", line 4, in from app import create_app File "/home/pi/unicorn-remote/app/init.py", line 5, in from app.state import state File "/home/pi/unicorn-remote/app/state.py", line 2, in import unicornhathd as unicornhat File "/usr/local/lib/python3.4/dist-packages/unicornhathd/init.py", line 20, in _spi.open(0, 0) FileNotFoundError: [Errno 2] No such file or directory

njbbaer commented 6 years ago

Hi! Thanks for making an issue.

The error message is complaining the Python package for the hd unicorn hat isn't installed. Technically this shouldn't matter because you are using the original unicorn hat (not the hd) but it appears to require both anyway.

A quick fix is to manually install the package for the unicorn hat hd. Please let me know if this works.

unicornrobot commented 6 years ago

Thats great. Installing the hd package fixed it. Thanks.

njbbaer commented 6 years ago

I'm glad that was it. I'm working on a fix so only the correct package will be necessary in the future. Please let me know if you have any more issues with the project.

Also if you could, I would appreciate it if you "star" the repository for me. It will help the project get more exposure.

njbbaer commented 6 years ago

A redesign of how programs are imported allows this to be fixed. Now only the libraries for the active unicorn hat model are loaded, so you do not need both libraries.