tecronin
Junior Member
Posts: 91
Raspberry Pi: Yes
|
Post by tecronin on Aug 4, 2021 19:18:47 GMT -8
[2021-08-04 22:12:20,588] ERROR in app: Exception on /_dash-update-component [POST] Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.7/dist-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1936, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/lib/python3.7/dist-packages/dash/dash.py", line 1096, in dispatch response.set_data(func(*args, outputs_list=outputs_list)) File "/usr/local/lib/python3.7/dist-packages/dash/dash.py", line 1017, in add_context output_value = func(*args, **kwargs) # %% callback invoked %% File "index.py", line 495, in updateLightningUpdate value = lightning_page.LLJSON[id['index']] KeyError: 'systemlog'
|
|
|
Post by SDL on Aug 6, 2021 10:32:21 GMT -8
What update are you talking about? What version of SkyWeather2?
We did fix some lightning page stuff in V027D which is due out at the end of next week.
Does the lightning page show up first and then the update fails?
BP
|
|
|
Post by doxidad on Aug 6, 2021 12:26:24 GMT -8
I've seen this error on a few releases of SkyWeather2's dash. It normally squawks when you click on the syslog tab on the nav bar. Since it doesn't take down the app and I'm lazy I have been ignoring it.
I also found an indent error (should have been indented) in dash_app.py in a nested if then else which causes the object fig to be returned when it is not defined (it is in the nested if statement but it is not defined because the condition is not met). I'll find the lines and version for you when I can get at the code.
|
|
tecronin
Junior Member
Posts: 91
Raspberry Pi: Yes
|
Post by tecronin on Aug 16, 2021 15:32:49 GMT -8
pulling in the latest from github
from SkyWeather2.py
config.SWVERSION = "026.5"
|
|
|
Post by SDL on Aug 16, 2021 17:35:54 GMT -8
027 Is going out on Thursday. I'd really like to have this fixed for that. Doxidad? Your fix would be good too.
BP
|
|
|
Post by SDL on Aug 16, 2021 17:36:59 GMT -8
trericon,
What did you to do to get this error? Switch from lightning to log page? That's my suspicion.
B{
|
|
|
Post by doxidad on Aug 17, 2021 4:15:53 GMT -8
Here's where the indent is incorrect in index.py that returns the error about fig not being defined. line 181+ 182 need indented one more level to be blocked with the previous if statement - it is now blocked with the main if statement and if the next if is not met will return fig without being defined.
169 def logpageupdate(n_intervals, id, value): 170 171 #if (True): # 1 minutes -10 second timer 172 if ((n_intervals % (1*6)) == 0): # 1 minutes -10 second timer 173 #print ("---->inputs:",dash.callback_context.inputs) 174 #print(">log_page table Update started",id['index']) 175 #print("LG-n_intervals=", n_intervals) 176 if (id['index'] == "systemlog"): 177 data = log_page.fetchSystemLog() 178 fig = log_page.buildTableFig(data,"System Log") 179 180 181 #print("<log_page table Update complete",id['index']) 182 return fig 183 else: 184 raise PreventUpdate
I'm not sure where the problem is in with the "KeyError: 'systemlog' error. I find it happens when logs are selected and it happens every 10 seconds so it has something to do with the refresh of the screen.
[2021-08-17 08:07:39,769] ERROR in app: Exception on /_dash-update-component [POST] Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.7/dist-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1936, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/lib/python3.7/dist-packages/dash/dash.py", line 1078, in dispatch response.set_data(func(*args, outputs_list=outputs_list)) File "/usr/local/lib/python3.7/dist-packages/dash/dash.py", line 1009, in add_context output_value = func(*args, **kwargs) # %% callback invoked %% File "/home/pi/SDL_Pi_SkyWeather2/dash_app/dash_app.py", line 495, in updateLightningUpdate value = lightning_page.LLJSON[id['index']] KeyError: 'systemlog'
You can see it happens every 10 seconds (as long as the log screen is displayed) from this log
[2021-08-17 08:08:58,612] ERROR in app: Exception on /_dash-update-component [POST] [2021-08-17 08:09:08,624] ERROR in app: Exception on /_dash-update-component [POST] [2021-08-17 08:09:18,657] ERROR in app: Exception on /_dash-update-component [POST] [2021-08-17 08:09:28,678] ERROR in app: Exception on /_dash-update-component [POST] [2021-08-17 08:09:38,684] ERROR in app: Exception on /_dash-update-component [POST] [2021-08-17 08:09:48,657] ERROR in app: Exception on /_dash-update-component [POST] [2021-08-17 08:09:58,660] ERROR in app: Exception on /_dash-update-component [POST] [2021-08-17 08:10:08,658] ERROR in app: Exception on /_dash-update-component [POST] [2021-08-17 08:10:18,636] ERROR in app: Exception on /_dash-update-component [POST] [2021-08-17 08:10:28,675] ERROR in app: Exception on /_dash-update-component [POST] [2021-08-17 08:10:38,612] ERROR in app: Exception on /_dash-update-component [POST] [2021-08-17 08:10:48,618] ERROR in app: Exception on /_dash-update-component [POST] [2021-08-17 08:10:58,689] ERROR in app: Exception on /_dash-update-component [POST] [2021-08-17 08:11:08,618] ERROR in app: Exception on /_dash-update-component [POST] [2021-08-17 08:11:18,632] ERROR in app: Exception on /_dash-update-component [POST]
|
|
tecronin
Junior Member
Posts: 91
Raspberry Pi: Yes
|
Post by tecronin on Aug 17, 2021 11:41:16 GMT -8
i just clicked through each tab
|
|
|
Post by SDL on Aug 17, 2021 13:54:02 GMT -8
doxidad,
Thanks. I've fixed the errant indent in V027.
Regarding the lighting index. I'm looking. Something is updating that shouldn't.
BP
|
|