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 messages #339

Closed
chStaiger opened this issue Nov 7, 2024 · 0 comments · Fixed by #347
Closed

Improving error messages #339

chStaiger opened this issue Nov 7, 2024 · 0 comments · Fixed by #347

Comments

@chStaiger
Copy link

Related to #338

The error messages in the step create-meta do not specify which variable is causing the trouble.
It would be nice to print the variable name and to format the error message a bit.

Example error when employing a config file with more than 10 variables :(

staig001@busoni create_syn_data %  metasyn create-meta --config environment_config.toml -o environment_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 147, in fit_dataframe
    distribution = meta_config.dist_providers.create(var_spec)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/staig001/git-repos/metasyn/metasyn/provider.py", line 249, in create
    return dist_class(**dist_spec.parameters)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: UniqueKeyDistribution.__init__() got an unexpected keyword argument 'upper'
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

Successfully merging a pull request may close this issue.

1 participant