Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving error message for prop_missing #338

Open
chStaiger opened this issue Nov 7, 2024 · 0 comments
Open

Improving error message for prop_missing #338

chStaiger opened this issue Nov 7, 2024 · 0 comments

Comments

@chStaiger
Copy link

chStaiger commented Nov 7, 2024

The current error message when one forgets to set the prop_missing parameter in the config file is

staig001@busoni create_syn_data % metasyn create-meta --config host_config.toml -o hosts_gmf_1
.json
Traceback (most recent call last):
  File "/opt/homebrew/bin/metasyn", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/staig001/git-repos/metasyn/metasyn/__main__.py", line 82, in main
    create_metadata()
  File "/Users/staig001/git-repos/metasyn/metasyn/__main__.py", line 132, in create_metadata
    meta_frame = MetaFrame.from_config(meta_config)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/staig001/git-repos/metasyn/metasyn/metaframe.py", line 177, in from_config
    return cls.fit_dataframe(None, meta_config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/staig001/git-repos/metasyn/metasyn/metaframe.py", line 148, in fit_dataframe
    var = MetaVar(
          ^^^^^^^^
  File "/Users/staig001/git-repos/metasyn/metasyn/var.py", line 77, in __init__
    if self.prop_missing < -1e-8 or self.prop_missing > 1 + 1e-8:
       ^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'NoneType' and 'float'

It would be nice if the error message could state for which variable the prop_missing is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant