2024-11-04, 04:37 PM
Hi
I've just installed openplotter-settings on ubuntu 22.04
I then installed CAN Bus 4.1.0-stable
when I press "open" to run it, I get the following dump on the console:
Traceback (most recent call last):
File "/usr/bin/openplotter-can", line 11, in <module>
load_entry_point('openplotterCan==4.1.0', 'console_scripts', 'openplotter-can')()
File "/usr/lib/python3/dist-packages/openplotterCan/openplotterCan.py", line 1552, in main
MyFrame().Show()
File "/usr/lib/python3/dist-packages/openplotterCan/openplotterCan.py", line 94, in __init__
self.pageSk()
File "/usr/lib/python3/dist-packages/openplotterCan/openplotterCan.py", line 180, in pageSk
self.readSk()
File "/usr/lib/python3/dist-packages/openplotterCan/openplotterCan.py", line 190, in readSk
if 'pipedProviders' in data:
UnboundLocalError: local variable 'data' referenced before assignment
Terminated
I am not really a Python expert, but I belive that a patch like the following could fix the problem (at least it looks like it fixed for me)
Thank you for your work
Bye
I've just installed openplotter-settings on ubuntu 22.04
I then installed CAN Bus 4.1.0-stable
when I press "open" to run it, I get the following dump on the console:
Traceback (most recent call last):
File "/usr/bin/openplotter-can", line 11, in <module>
load_entry_point('openplotterCan==4.1.0', 'console_scripts', 'openplotter-can')()
File "/usr/lib/python3/dist-packages/openplotterCan/openplotterCan.py", line 1552, in main
MyFrame().Show()
File "/usr/lib/python3/dist-packages/openplotterCan/openplotterCan.py", line 94, in __init__
self.pageSk()
File "/usr/lib/python3/dist-packages/openplotterCan/openplotterCan.py", line 180, in pageSk
self.readSk()
File "/usr/lib/python3/dist-packages/openplotterCan/openplotterCan.py", line 190, in readSk
if 'pipedProviders' in data:
UnboundLocalError: local variable 'data' referenced before assignment
Terminated
I am not really a Python expert, but I belive that a patch like the following could fix the problem (at least it looks like it fixed for me)
Code:
--- /usr/lib/python3/dist-packages/openplotterCan/openplotterCan.py-orig 2024-11-04 16:27:50.523849784 +0100
+++ /usr/lib/python3/dist-packages/openplotterCan/openplotterCan.py 2024-11-04 16:29:34.789978732 +0100
@@ -181,9 +181,9 @@
def readSk(self):
self.sklist = []
+ data = ''
try:
setting_file = self.platform.skDir+'/settings.json'
- data = ''
with open(setting_file) as data_file:
data = ujson.load(data_file)
except:pass
Thank you for your work
Bye