Description
Describe the bug
Code in notebook cells do not have an associated filename, inspect.getfile
will raise an error if applied to definitions in cells. The notebook notebooks/tutorials/01_simple_app.ipynb
has this issue where an instance of the class App
is created without specifying a path.
Steps/Code to reproduce bug
Run the notebook up to the cell below We can execute the app in the Jupyter notebook.
This cell will raise an error indicating inspect
couldn't find a filename. If the code of the cell is modified to be app = App(path='.')
it will function correctly.
Expected behavior
The exception from inspect.getfile
should be caught and a default filename chosen.
Environment details (please complete the following information)
- OS/Platform: Ubuntu 20.04
- Python Version: 3.9
- Method of MONAI Deploy App SDK install: pip for deploy sdk, conda for everything else
- SDK Version: 0.2.0
Additional context
This may be a Python 3.9 issue, I haven't tested with other versions yet.