tudat-team / tudatpy

A Python platform to perform astrodynamics and space research.

Home Page:https://tudat-space.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Any SPICE errors will not be output in Jupyter Notebook (kernel crashed)

geoffreygarrett opened this issue · comments

If spice kernels are requested, which are not loaded, execution of code in a Jupyter Notebook will be met with no output, only a crashed kernel. This is similar to when tests fail without output in tudat, when files are not found. Can we resolve this and somehow raise an error that can be displayed in tudat test failure and informative tudatpy errors?

Steps to reproduce:

  1. Open binder at https://github.com/tudat-team/sample-binder
  2. Comment out "spice_interface.load_standard_kernels()"
  3. Restart kernel and execute all cells.

Spice does provide a number of ways in which to handle its errors:

https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/error.html

The specific options that are available are listed here:

https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/error.html#Choosing%20the%20Error%20Response%20Action

Spice does print an error message to the terminal, can this output not be piped to the Notebook output?

By the way, there seems to be an issue with the Binder, I'm getting this error:

image

when attempting to open it

Hey Dominic, did the binder not eventually load? I used the link and it loaded fine for me. Let me know if binder doesn't load, it took less than a minute for me on the screen that you shared a screenshot of.

Regarding the error handing with spice, I'll have a look into it.

Hi Geoffrey, it seems to be loading fine now. I was in a bit of a hurry this morning, so there's a good chance I was just being impatient :)