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

We need user-friendly errors #18

Open
spficklin opened this issue Jul 12, 2024 · 0 comments
Open

We need user-friendly errors #18

spficklin opened this issue Jul 12, 2024 · 0 comments

Comments

@spficklin
Copy link
Member

If you run the scald analysis and you give it an empty directory you get the following message.

Traceback (most recent call last):
  File "/home/ficklin/.local/bin/granny", line 8, in <module>
    sys.exit(run())
  File "/home/ficklin/.local/lib/python3.10/site-packages/Granny/GrannyBase.py", line 76, in run
    iface.run()
  File "/home/ficklin/.local/lib/python3.10/site-packages/Granny/Interfaces/UI/GrannyCLI.py", line 59, in run
    result_images = analysis.performAnalysis()
  File "/home/ficklin/.local/lib/python3.10/site-packages/Granny/Analyses/SuperficialScald.py", line 263, in performAnalysis
    self.output_results.writeValue()
  File "/home/ficklin/.local/lib/python3.10/site-packages/Granny/Models/Values/MetaDataValue.py", line 38, in writeValue
    image_rating = image_rating.sort_values(by="Name").reset_index(drop=True)
  File "/home/ficklin/.local/lib/python3.10/site-packages/pandas/core/frame.py", line 7189, in sort_values
    k = self._get_label_or_level_values(by[0], axis=axis)
  File "/home/ficklin/.local/lib/python3.10/site-packages/pandas/core/generic.py", line 1911, in _get_label_or_level_values
    raise KeyError(key)
KeyError: 'Name'

We need to do some stress testing and make sure that when people make such mistakes they get a friendly message telling them what they did wrong.

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