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

FileNotFoundError: [Errno 2] No such file or directory for smbus.SMBus(_SMBUS_DEV) #7

Open
ptalbert opened this issue Sep 21, 2020 · 1 comment · May be fixed by #9
Open

FileNotFoundError: [Errno 2] No such file or directory for smbus.SMBus(_SMBUS_DEV) #7

ptalbert opened this issue Sep 21, 2020 · 1 comment · May be fixed by #9

Comments

@ptalbert
Copy link

Great program, thank you!

I was getting this error when starting the argonone service:

Sep 21 12:37:40 raspberrypi argonone[9701]: INFO: Loading config file from /etc/argonone.yaml
Sep 21 12:37:40 raspberrypi argonone[9701]: Traceback (most recent call last):
Sep 21 12:37:40 raspberrypi argonone[9701]:   File "/usr/bin/argononed", line 11, in <module>
Sep 21 12:37:40 raspberrypi argonone[9701]:     load_entry_point('argon1==0.1', 'console_scripts', 'argononed')()
Sep 21 12:37:40 raspberrypi argonone[9701]:   File "/usr/lib/python3/dist-packages/argonone/cmdline.py", line 175, in argondaemon_main
Sep 21 12:37:40 raspberrypi argonone[9701]:     daemon = ArgonDaemon()
Sep 21 12:37:40 raspberrypi argonone[9701]:   File "/usr/lib/python3/dist-packages/argonone/__init__.py", line 541, in __init__
Sep 21 12:37:40 raspberrypi argonone[9701]:     self._argon_board = ArgonOneBoard(initial_speed=0, bus_mutex=Lock())
Sep 21 12:37:40 raspberrypi argonone[9701]:   File "/usr/lib/python3/dist-packages/argonone/__init__.py", line 78, in __init__
Sep 21 12:37:40 raspberrypi argonone[9701]:     self._bus = smbus.SMBus(_SMBUS_DEV)
Sep 21 12:37:40 raspberrypi argonone[9701]: FileNotFoundError: [Errno 2] No such file or directory

The smbus python module gave this error because the i2c kernel modules were not loaded. The raspi-config program offers a nice way to have them automatically loaded and then the service runs without issue.

I don't know if it is appropriate for the deb package installation to take care of this but otherwise maybe the README could mention it.

@gitgrift gitgrift linked a pull request Sep 21, 2020 that will close this issue
@spapadim
Copy link
Owner

spapadim commented Sep 21, 2020 via email

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.

2 participants