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 am creating synthetic data with a toml file. When the toml file is not well formatted metsyn throws this error message:
staig001@busoni autumn-fair % metasyn create-meta --config event_config.toml
Traceback (most recent call last):
File "/Users/staig001/.local/bin/metasyn", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/staig001/.local/pipx/venvs/metasyn/lib/python3.12/site-packages/metasyn/__main__.py", line 80, in main
create_metadata()
File "/Users/staig001/.local/pipx/venvs/metasyn/lib/python3.12/site-packages/metasyn/__main__.py", line 127, in create_metadata
meta_frame = MetaFrame.from_config(meta_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/staig001/.local/pipx/venvs/metasyn/lib/python3.12/site-packages/metasyn/metaframe.py", line 169, in from_config
return cls.fit_dataframe(None, meta_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/staig001/.local/pipx/venvs/metasyn/lib/python3.12/site-packages/metasyn/metaframe.py", line 140, in fit_dataframe
var = MetaVar(
^^^^^^^^
File "/Users/staig001/.local/pipx/venvs/metasyn/lib/python3.12/site-packages/metasyn/var.py", line 72, in __init__
if self.prop_missing < -1e-8 or self.prop_missing > 1 + 1e-8:
^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'NoneType' and 'float'
staig001@busoni autumn-fair % metasyn create-meta --config event_config.toml
Traceback (most recent call last):
File "/Users/staig001/.local/pipx/venvs/metasyn/lib/python3.12/site-packages/metasyn/config.py", line 102, in from_toml
config_dict = tomllib.load(handle)
^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/tomllib/_parser.py", line 66, in load
return loads(s, parse_float=parse_float)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/tomllib/_parser.py", line 127, in loads
raise suffixed_err(
tomllib.TOMLDecodeError: Expected newline or end of document after a statement (at line 44, column 8)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/staig001/.local/bin/metasyn", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/staig001/.local/pipx/venvs/metasyn/lib/python3.12/site-packages/metasyn/__main__.py", line 80, in main
create_metadata()
File "/Users/staig001/.local/pipx/venvs/metasyn/lib/python3.12/site-packages/metasyn/__main__.py", line 120, in create_metadata
meta_config = MetaConfig.from_toml(args.config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/staig001/.local/pipx/venvs/metasyn/lib/python3.12/site-packages/metasyn/config.py", line 109, in from_toml
raise ValueError(f"It appears '{Path(config_fp).name}' is a"
ValueError: It appears 'event_config.toml' is a '.toml' file. To load a MetaConfig, provide it as a .toml file.
Is it possible to distinguish whether the file was not a toml file or whether it is an incorrectly formatted toml file and adjust the feedback in the error message?
The text was updated successfully, but these errors were encountered:
I am creating synthetic data with a toml file. When the toml file is not well formatted metsyn throws this error message:
Is it possible to distinguish whether the file was not a toml file or whether it is an incorrectly formatted toml file and adjust the feedback in the error message?
The text was updated successfully, but these errors were encountered: