Autoupdate Start new default dock do not refer to the original fig object in BECIPythonClient
Bug report
Summary
If the gui is cleared and all docks are deleted, then the original fig
object is deleted and not created again.
Expected Behavior vs Actual Behavior
[Describe what you expected to happen and what actually happened.]
Steps to Reproduce
• demo [1/17] ❯❯ gui.clear_all()
• demo [2/17] ❯❯ gui.auto_updates.start_default_dock()
• demo [3/17] ❯❯ fig.image('eiger')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[3], line 1
----> 1 fig.image('eiger')
File ~/PSI/bec_widgets/bec_widgets/cli/client_utils.py:65, in rpc_call.<locals>.wrapper(self, *args, **kwargs)
63 if not self.gui_is_alive():
64 raise RuntimeError("GUI is not alive")
---> 65 return self._run_rpc(func.__name__, *args, **kwargs)
File ~/PSI/bec_widgets/bec_widgets/cli/client_utils.py:332, in RPCBase._run_rpc(self, method, wait_for_rpc_response, timeout, *args, **kwargs)
330 # get class name
331 if not response.accepted:
--> 332 raise ValueError(response.message["error"])
333 msg_result = response.message.get("result")
334 return self._create_widget_from_msg_result(msg_result)
ValueError: Object with gui_id BECFigure_1723649022.1873338 not found
Proposed Solution
Recreating the default dock should register the fig
back into BECIPythonClient