Orbit.from_sbdb raises unhelpful error if no object was found
See original GitHub issueIn [9]: Orbit.from_sbdb("67/P")
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-9-75d3da3ffd57> in <module>
----> 1 Orbit.from_sbdb("67/P")
~/.pyenv/versions/poliastro37_4/lib/python3.7/site-packages/poliastro/twobody/orbit.py in from_sbdb(cls, name, **kargs)
572 )
573
--> 574 a = obj["orbit"]["elements"]["a"].to(u.AU) * u.AU
575 ecc = float(obj["orbit"]["elements"]["e"]) * u.one
576 inc = obj["orbit"]["elements"]["i"].to(u.deg) * u.deg
KeyError: 'orbit'
It should give something more meaningful, like ValueError("Object 67/P not found")
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Dealing with "Object '....' not found" script errors
If the object isn't found object.exists() returns false and findObject() raises a catch-able exception. General commands like mouseClick() , ...
Read more >Rails: Why does find(id) raise an exception in rails? [duplicate]
I think the reason for raising the error is so the base controller can catch it and show show the 404 page. If...
Read more >Built-in Exceptions — Python 3.11.1 documentation
Raised when a local or global name is not found. This applies only to unqualified names. The associated value is an error message...
Read more >SML/NJ Error Messages
SML/NJ Error and Warning Messages. This document contains lists of error and warning messages produced by the SML/NJ Version 110 compiler, ...
Read more >Handling the 'Object Does Not Exist' Error - SmartBear Support
Find the first “The … object does not exist” error in the test log. Depending on the executed command, TestComplete can post several...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@astrojuanlu understood… Won’t happen from now onwards 😊
@priyanshurohilla As per my comment from 15 days ago:
I will be more explicit this time: blocking issues this way is not the correct attitude. Please refrain from doing so in the future.