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

redbiom search metadata NUMBER should fail gracefully #44

Closed
ElDeveloper opened this issue Jun 7, 2017 · 2 comments · Fixed by #122
Closed

redbiom search metadata NUMBER should fail gracefully #44

ElDeveloper opened this issue Jun 7, 2017 · 2 comments · Fixed by #122

Comments

@ElDeveloper
Copy link
Member

ElDeveloper commented Jun 7, 2017

Currently the following exception is shown on screen:

Traceback (most recent call last):
  File "/Users/yoshikivazquezbaeza/miniconda/envs/devbiom/bin/redbiom", line 11, in <module>
    load_entry_point('redbiom', 'console_scripts', 'redbiom')()
  File "/Users/yoshikivazquezbaeza/miniconda/envs/devbiom/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/yoshikivazquezbaeza/miniconda/envs/devbiom/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/yoshikivazquezbaeza/miniconda/envs/devbiom/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/yoshikivazquezbaeza/miniconda/envs/devbiom/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/yoshikivazquezbaeza/miniconda/envs/devbiom/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/yoshikivazquezbaeza/miniconda/envs/devbiom/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/yoshikivazquezbaeza/git_sw/redbiom/redbiom/commands/search.py", line 87, in search_metadata
    for i in redbiom.search.metadata_full(query, categories):
  File "/Users/yoshikivazquezbaeza/git_sw/redbiom/redbiom/search.py", line 51, in metadata_full
    stemmer=stem_f))
  File "/Users/yoshikivazquezbaeza/git_sw/redbiom/redbiom/set_expr.py", line 91, in seteval
    raise TypeError("Unsupported node type: %s" % ast.dump(node))
TypeError: Unsupported node type: Num(n=111)
@wasade
Copy link
Member

wasade commented Jun 8, 2017

That is graceful from the developer perspective... but yes, agree that it would be useful to be more clear to the user

@ryanc16
Copy link
Contributor

ryanc16 commented May 20, 2020

I think your point is that this information is useful from a developer's perspective, but to a user (especially a non-technical one), this information is confusing and quite intimidating. Perhaps a good solution would be to introduce some exception handling into the application and inform the user with human consumable error messages. In addition, a log file containing the details of the error can be created when a command fails, and the location of that log can be shown to the user after the message. The contents of that log can be requested in future issues to help developers debug and fix the issue.

wasade added a commit to wasade/redbiom that referenced this issue Dec 19, 2022
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.

3 participants