john_helt
john_helt8mo ago

is there a way to get more info about an

is there a way to get more info about an exception? I'm getting some generic exception An exception was raised by a UIElement's on_change handler... but which element, I cannot see that?
5 Replies
Myles Scolnick
Myles Scolnick8mo ago
can you paste the exception?
john_helt
john_heltOP8mo ago
I dont have it right now, as I'm not at work and the code is on that. I was wondering if there was a way to add more debugging info like changing log level or running marimo with a flag, or sth. When I get in tomorrow, I will paste the exact message! I cloned the repo at home and ran the code... here's the traceback: An exception was raised by a UIElement's on_change handler: Traceback (most recent call last): File "C:\Users\johnhelt\Documents\Work\gitlab\heatpump-designer-editor.venv\Lib\site-packages\marimo_runtime\runtime.py", line 1177, in set_ui_element_value component._update(value) File "C:\Users\johnhelt\Documents\Work\gitlab\heatpump-designer-editor.venv\Lib\site-packages\marimo_plugins\ui_core\ui_element.py", line 387, in _update self._value = self._convert_value(value) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johnhelt\Documents\Work\gitlab\heatpump-designer-editor.venv\Lib\site-packages\marimo_plugins\ui_impl\batch.py", line 97, in _convert_value element = self._elements[k] ~~~~~~^^^ KeyError: 'subcooler'
Myles Scolnick
Myles Scolnick8mo ago
1) You can run with -d for debug or --log-level - you can find the flags with marimo --help 2) for that error, it looks like subcooler is not defined. Hard to tell if this is a bug in your code or ours without seeing the code
john_helt
john_heltOP8mo ago
Yes, that's why I was thinking I could maybe get debug info about which cell failed, then it would be easier to locate the bug on my side
Myles Scolnick
Myles Scolnick8mo ago
Yea, its not super clear which cell from the stack trace - my guess would be a form or mo.ui.array() - something that uses batch internally