argon1 icon indicating copy to clipboard operation
argon1 copied to clipboard

AttributeError: 'ArgonOneBoard' object has no attribute '_bus' (I2C interfaces are not automatically enabled)

Open TheVirtualMoose opened this issue 3 years ago • 0 comments

The packages requires I2C interfaces on RPi to be enabled, but it doesn't do it itself. Instead, user has to enable them manually in raspi-config. If this is not done, argononed crashes with the following message:

Sep 16 00:01:15 Kerensky argonone[1523]: INFO: Loading config file from /etc/argonone.yaml Sep 16 00:01:15 Kerensky argonone[1523]: /usr/lib/python3/dist-packages/argonone/init.py:529: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. Sep 16 00:01:15 Kerensky argonone[1523]: config = yaml.load(fp) Sep 16 00:01:15 Kerensky argonone[1523]: Traceback (most recent call last): Sep 16 00:01:15 Kerensky argonone[1523]: File "/usr/bin/argononed", line 11, in Sep 16 00:01:15 Kerensky argonone[1523]: load_entry_point('argon1==0.1', 'console_scripts', 'argononed')() Sep 16 00:01:15 Kerensky argonone[1523]: File "/usr/lib/python3/dist-packages/argonone/cmdline.py", line 175, in argondaemon_main Sep 16 00:01:15 Kerensky argonone[1523]: daemon = ArgonDaemon() Sep 16 00:01:15 Kerensky argonone[1523]: File "/usr/lib/python3/dist-packages/argonone/init.py", line 541, in init Sep 16 00:01:15 Kerensky argonone[1523]: self._argon_board = ArgonOneBoard(initial_speed=0, bus_mutex=Lock()) Sep 16 00:01:15 Kerensky argonone[1523]: File "/usr/lib/python3/dist-packages/argonone/init.py", line 78, in init Sep 16 00:01:15 Kerensky argonone[1523]: self._bus = smbus.SMBus(_SMBUS_DEV) Sep 16 00:01:15 Kerensky argonone[1523]: FileNotFoundError: [Errno 2] No such file or directory Sep 16 00:01:15 Kerensky argonone[1523]: Exception ignored in: <function ArgonOneBoard.del at 0xb56dad18> Sep 16 00:01:15 Kerensky argonone[1523]: Traceback (most recent call last): Sep 16 00:01:15 Kerensky argonone[1523]: File "/usr/lib/python3/dist-packages/argonone/init.py", line 154, in del Sep 16 00:01:15 Kerensky argonone[1523]: self.close() Sep 16 00:01:15 Kerensky argonone[1523]: File "/usr/lib/python3/dist-packages/argonone/init.py", line 151, in close Sep 16 00:01:15 Kerensky argonone[1523]: self._bus.close() Sep 16 00:01:15 Kerensky argonone[1523]: AttributeError: 'ArgonOneBoard' object has no attribute '_bus'

TheVirtualMoose avatar Sep 16 '21 12:09 TheVirtualMoose