You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the Skybot does not find a solar system object in the specified search area (Skybot.cone_search), it throws an exception such as RuntimeError. For other exceptions (incorrect data or lack of Internet), the type of exceptions is the same, only the text of the messages differs. It is necessary to differ between object "not found" events and "service error" events. Possible solution:
try:
results = Skybot.cone_search(field, 0.0041667*u.deg, earthed_time, location='I41')
return len(results) > 0, results[0]['Name']
except Exception as e:
if len(e.args)>0 and e.args[0][0:22]=='No solar system object':
return False, 'No object'
else:
print(f'Exception {e.args[0]}')
return False, 'Service error'
The text was updated successfully, but these errors were encountered:
If the Skybot does not find a solar system object in the specified search area (Skybot.cone_search), it throws an exception such as RuntimeError. For other exceptions (incorrect data or lack of Internet), the type of exceptions is the same, only the text of the messages differs. It is necessary to differ between object "not found" events and "service error" events. Possible solution:
The text was updated successfully, but these errors were encountered: