question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Orbit.from_sbdb raises unhelpful error if no object was found

See original GitHub issue
In [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:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
priyanshurohillacommented, Apr 19, 2020

@priyanshurohilla As per my comment from 15 days ago:

On the other hand, it gives the impression that others should refrain to work on the issue, which is wrong.

I will be more explicit this time: blocking issues this way is not the correct attitude. Please refrain from doing so in the future.

@astrojuanlu understood… Won’t happen from now onwards 😊

1reaction
astrojuanlucommented, Apr 19, 2020

@priyanshurohilla As per my comment from 15 days ago:

On the other hand, it gives the impression that others should refrain to work on the issue, which is wrong.

I will be more explicit this time: blocking issues this way is not the correct attitude. Please refrain from doing so in the future.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found