paulscherrerinstitute / photodiag_web

GNU General Public License v3.0
0 stars 1 forks source link

SAROP31-PBPS113 push calibration fails #6

Closed arrellc closed 1 year ago

arrellc commented 1 year ago

Error message when calibration push is attempted. SAROP31 devices do not need epics record calcs updated, just the pipeline. Is this what is causing the error?

ivan-usov commented 1 year ago

"SAROP31-PBPS113" and "SAROP31-PBPS149" are excluded from updates to epics, so it shouldn't cause the error. Could you copy the error itself?

arrellc commented 1 year ago

2023-01-25 17:16:49 ERROR: error handling message message: Message 'PATCH-DOC' content: {'events': [{'kind': 'MessageSent', 'msg_type': 'bokeh_event', 'msg_data': {'type': 'event', 'name': 'button_click', 'values': {'type': 'map', 'entries': [['model', {'id': 'p1280710'}]]}}}]} error: UnboundLocalError("local variable 'device_name' referenced before assignment") Traceback (most recent call last): File "/opt/miniconda3/envs/prod/lib/python3.8/site-packages/bokeh/server/protocol_handler.py", line 97, in handle work = await handler(message, connection) File "/opt/miniconda3/envs/prod/lib/python3.8/site-packages/bokeh/server/session.py", line 93, in _needs_document_lock_wrapper result = func(self, *args, **kwargs) File "/opt/miniconda3/envs/prod/lib/python3.8/site-packages/bokeh/server/session.py", line 287, in _handle_patch message.apply_to_document(self.document, self) File "/opt/miniconda3/envs/prod/lib/python3.8/site-packages/bokeh/protocol/messages/patch_doc.py", line 104, in apply_to_document invoke_with_curdoc(doc, lambda: doc.apply_json_patch(self.payload, setter=setter)) File "/opt/miniconda3/envs/prod/lib/python3.8/site-packages/bokeh/document/callbacks.py", line 426, in invoke_with_curdoc return f() File "/opt/miniconda3/envs/prod/lib/python3.8/site-packages/bokeh/protocol/messages/patch_doc.py", line 104, in invoke_with_curdoc(doc, lambda: doc.apply_json_patch(self.payload, setter=setter)) File "/opt/miniconda3/envs/prod/lib/python3.8/site-packages/bokeh/document/document.py", line 375, in apply_json_patch DocumentPatchedEvent.handle_event(self, event, setter) File "/opt/miniconda3/envs/prod/lib/python3.8/site-packages/bokeh/document/events.py", line 246, in handle_event event_cls._handle_event(doc, event) File "/opt/miniconda3/envs/prod/lib/python3.8/site-packages/bokeh/document/events.py", line 281, in _handle_event cb(event.msg_data) File "/opt/miniconda3/envs/prod/lib/python3.8/site-packages/bokeh/document/callbacks.py", line 373, in trigger_event model._trigger_event(event) File "/opt/miniconda3/envs/prod/lib/python3.8/site-packages/bokeh/util/callback_manager.py", line 113, in _trigger_event self.document.callbacks.notify_event(cast(Model, self), event, invoke) File "/opt/miniconda3/envs/prod/lib/python3.8/site-packages/bokeh/document/callbacks.py", line 254, in notify_event invoke_with_curdoc(doc, callback_invoker) File "/opt/miniconda3/envs/prod/lib/python3.8/site-packages/bokeh/document/callbacks.py", line 426, in invoke_with_curdoc return f() File "/opt/miniconda3/envs/prod/lib/python3.8/site-packages/bokeh/util/callback_manager.py", line 107, in invoke cast(EventCallbackWithoutEvent, callback)() File "/opt/miniconda3/envs/prod/lib/python3.8/site-packages/photodiag_web/app/panel_calibration.py", line 396, in push_results_button_callback log.info(f"camera_server config updated for {device_name}") UnboundLocalError: local variable 'device_name' referenced before assignment

ivan-usov commented 1 year ago

I just restarted the test server with the fix.