You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came across an error, where some marimo tools that I created were not running, due to a defected recent_files.toml file.
I'm not sure what caused the file to be bad, and already removed it, but I do know that the code around line 37 in marimo/_utils/config/config.py tries to parse this file and only handles FileNotFoundError - it does not handle parsing errors, and apparently they happen.
Thank you, and here's the traceback of this error:
File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/marimo/_server/api/endpoints/ws.py", line 441, in get_sessi>
Jan 31 17:12:30 crete run_mpmt.sh[1701]: new_session = mgr.create_session(
Jan 31 17:12:30 crete run_mpmt.sh[1701]: ^^^^^^^^^^^^^^^^^^^
Jan 31 17:12:30 crete run_mpmt.sh[1701]: File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/marimo/_server/sessions.py", line 729, in create_session
Jan 31 17:12:30 crete run_mpmt.sh[1701]: self.recents.touch(app_file_manager.path)
Jan 31 17:12:30 crete run_mpmt.sh[1701]: File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/marimo/_server/recents.py", line 42, in touch
Jan 31 17:12:30 crete run_mpmt.sh[1701]: state = self.config.read_toml(
Jan 31 17:12:30 crete run_mpmt.sh[1701]: ^^^^^^^^^^^^^^^^^^^^^^
Jan 31 17:12:30 crete run_mpmt.sh[1701]: File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/marimo/_utils/config/config.py", line 37, in read_toml
Jan 31 17:12:30 crete run_mpmt.sh[1701]: data = tomlkit.parse(file.read())
Jan 31 17:12:30 crete run_mpmt.sh[1701]: ^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 31 17:12:30 crete run_mpmt.sh[1701]: File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/tomlkit/api.py", line 91, in parse
Jan 31 17:12:30 crete run_mpmt.sh[1701]: return Parser(string).parse()
Jan 31 17:12:30 crete run_mpmt.sh[1701]: ^^^^^^^^^^^^^^^^^^^^^^
Jan 31 17:12:30 crete run_mpmt.sh[1701]: File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/tomlkit/parser.py", line 139, in parse
Jan 31 17:12:30 crete run_mpmt.sh[1701]: item = self._parse_item()
Jan 31 17:12:30 crete run_mpmt.sh[1701]: ^^^^^^^^^^^^^^^^^^
Jan 31 17:12:30 crete run_mpmt.sh[1701]: File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/tomlkit/parser.py", line 238, in _parse_item
Jan 31 17:12:30 crete run_mpmt.sh[1701]: return self._parse_key_value(True)
Jan 31 17:12:30 crete run_mpmt.sh[1701]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 31 17:12:30 crete run_mpmt.sh[1701]: File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/tomlkit/parser.py", line 323, in _parse_key_value
Jan 31 17:12:30 crete run_mpmt.sh[1701]: raise self.parse_error(UnexpectedCharError, self._current)
Jan 31 17:12:30 crete run_mpmt.sh[1701]: tomlkit.exceptions.UnexpectedCharError: Unexpected character: ',' at line 2 col 43
Describe the bug
I came across an error, where some marimo tools that I created were not running, due to a defected recent_files.toml file.
I'm not sure what caused the file to be bad, and already removed it, but I do know that the code around line 37 in marimo/_utils/config/config.py tries to parse this file and only handles FileNotFoundError - it does not handle parsing errors, and apparently they happen.
Thank you, and here's the traceback of this error:
File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/marimo/_server/api/endpoints/ws.py", line 441, in get_sessi>
Jan 31 17:12:30 crete run_mpmt.sh[1701]: new_session = mgr.create_session(
Jan 31 17:12:30 crete run_mpmt.sh[1701]: ^^^^^^^^^^^^^^^^^^^
Jan 31 17:12:30 crete run_mpmt.sh[1701]: File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/marimo/_server/sessions.py", line 729, in create_session
Jan 31 17:12:30 crete run_mpmt.sh[1701]: self.recents.touch(app_file_manager.path)
Jan 31 17:12:30 crete run_mpmt.sh[1701]: File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/marimo/_server/recents.py", line 42, in touch
Jan 31 17:12:30 crete run_mpmt.sh[1701]: state = self.config.read_toml(
Jan 31 17:12:30 crete run_mpmt.sh[1701]: ^^^^^^^^^^^^^^^^^^^^^^
Jan 31 17:12:30 crete run_mpmt.sh[1701]: File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/marimo/_utils/config/config.py", line 37, in read_toml
Jan 31 17:12:30 crete run_mpmt.sh[1701]: data = tomlkit.parse(file.read())
Jan 31 17:12:30 crete run_mpmt.sh[1701]: ^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 31 17:12:30 crete run_mpmt.sh[1701]: File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/tomlkit/api.py", line 91, in parse
Jan 31 17:12:30 crete run_mpmt.sh[1701]: return Parser(string).parse()
Jan 31 17:12:30 crete run_mpmt.sh[1701]: ^^^^^^^^^^^^^^^^^^^^^^
Jan 31 17:12:30 crete run_mpmt.sh[1701]: File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/tomlkit/parser.py", line 139, in parse
Jan 31 17:12:30 crete run_mpmt.sh[1701]: item = self._parse_item()
Jan 31 17:12:30 crete run_mpmt.sh[1701]: ^^^^^^^^^^^^^^^^^^
Jan 31 17:12:30 crete run_mpmt.sh[1701]: File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/tomlkit/parser.py", line 238, in _parse_item
Jan 31 17:12:30 crete run_mpmt.sh[1701]: return self._parse_key_value(True)
Jan 31 17:12:30 crete run_mpmt.sh[1701]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 31 17:12:30 crete run_mpmt.sh[1701]: File "/home/gvmarimo/.cache/pypoetry/virtualenvs/ml-pipeline-ZP2dUw9--py3.12/lib/python3.12/site-packages/tomlkit/parser.py", line 323, in _parse_key_value
Jan 31 17:12:30 crete run_mpmt.sh[1701]: raise self.parse_error(UnexpectedCharError, self._current)
Jan 31 17:12:30 crete run_mpmt.sh[1701]: tomlkit.exceptions.UnexpectedCharError: Unexpected character: ',' at line 2 col 43
Environment
Code to reproduce
No response
The text was updated successfully, but these errors were encountered: