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

a coomand breaks the app when the id is unknown #52

Open
tngTUDOR opened this issue Oct 1, 2024 · 0 comments
Open

a coomand breaks the app when the id is unknown #52

tngTUDOR opened this issue Oct 1, 2024 · 0 comments

Comments

@tngTUDOR
Copy link
Collaborator

tngTUDOR commented Oct 1, 2024

current

supplying a bogus activity id breaks the app

expected

be more graceful

po0w@(wow-cutoff) >> a 776861ca-0782-5449-943a-9bdd74e61e86
Traceback (most recent call last):
File "/opt/conda/lib/python3.12/site-packages/bw2ui/bin/bw2_browser.py", line 856, in do_a
a_numerical_id = int(arg)
^^^^^^^^
ValueError: invalid literal for int() with base 10: '776861ca-0782-5449-943a-9bdd74e61e86'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/conda/bin/bw2-browser", line 10, in <module>
sys.exit(main())
^^^^^^
File "/opt/conda/lib/python3.12/site-packages/bw2ui/bin/bw2_browser.py", line 1816, in main
activitybrowser.cmdloop()
File "/opt/conda/lib/python3.12/cmd.py", line 138, in cmdloop
stop = self.onecmd(line)
^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.12/cmd.py", line 217, in onecmd
return func(arg)
^^^^^^^^^
File "/opt/conda/lib/python3.12/site-packages/bw2ui/bin/bw2_browser.py", line 861, in do_a
_ = get_activity(key)
^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.12/site-packages/bw2data/utils.py", line 432, in get_activity
return get_node(**kwargs)
^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.12/site-packages/bw2data/utils.py", line 414, in get_node
raise UnknownObject
bw2data.errors.UnknownObject

seen on version 0.42.0

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