2020-11-20, 03:02 AM
I recently upgraded my Openplotter deployment from RPi3 to RPi4. The upgrade was pretty smooth. However, when launching the I2C GUI nothing happens. Running openplotter-i2c from the command line results in:
Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/openplotterI2c/startup.py", line 53, in check
subprocess.check_output(['i2cdetect', '-y', '0']).decode(sys.stdin.encoding)
File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/usr/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['i2cdetect', '-y', '0']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/openplotter-i2c", line 11, in <module>
load_entry_point('openplotterI2c==2.2.0', 'console_scripts', 'openplotter-i2c')()
File "/usr/lib/python3/dist-packages/openplotterI2c/openplotterI2c.py", line 724, in main
MyFrame().Show()
File "/usr/lib/python3/dist-packages/openplotterI2c/openplotterI2c.py", line 95, in __init__
self.checkInterface()
File "/usr/lib/python3/dist-packages/openplotterI2c/openplotterI2c.py", line 162, in checkInterface
result = cheking.check()
File "/usr/lib/python3/dist-packages/openplotterI2c/startup.py", line 76, in check
if ii['pipeElements'][0]['options']['type']=='SignalK':
KeyError: 'type'
I have both a BME380 and an MPU9250 on the bus. MPU9250 is picked up by pypilot OK.
Running i2cdetect -l shows i2c-1 active, nothing for i2c-0.
i2cdetect -y 1 produces:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- 76 --
I've traced some of the code back but I'm not a python guy so I'm not sure why the script is failing where it is. Hoping someone can point me in the right direction for a fix. Thank you!
Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/openplotterI2c/startup.py", line 53, in check
subprocess.check_output(['i2cdetect', '-y', '0']).decode(sys.stdin.encoding)
File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/usr/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['i2cdetect', '-y', '0']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/openplotter-i2c", line 11, in <module>
load_entry_point('openplotterI2c==2.2.0', 'console_scripts', 'openplotter-i2c')()
File "/usr/lib/python3/dist-packages/openplotterI2c/openplotterI2c.py", line 724, in main
MyFrame().Show()
File "/usr/lib/python3/dist-packages/openplotterI2c/openplotterI2c.py", line 95, in __init__
self.checkInterface()
File "/usr/lib/python3/dist-packages/openplotterI2c/openplotterI2c.py", line 162, in checkInterface
result = cheking.check()
File "/usr/lib/python3/dist-packages/openplotterI2c/startup.py", line 76, in check
if ii['pipeElements'][0]['options']['type']=='SignalK':
KeyError: 'type'
I have both a BME380 and an MPU9250 on the bus. MPU9250 is picked up by pypilot OK.
Running i2cdetect -l shows i2c-1 active, nothing for i2c-0.
i2cdetect -y 1 produces:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- 76 --
I've traced some of the code back but I'm not a python guy so I'm not sure why the script is failing where it is. Hoping someone can point me in the right direction for a fix. Thank you!