jupyterlab_templates icon indicating copy to clipboard operation
jupyterlab_templates copied to clipboard

Catch the IO exceptions so they won't bring down the whole template system

Open kdzhao opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe.

Some times (after adding more templates), the template UI simply disappeared from the UI.

After some troubleshooting, we noticed it is because in this function: https://github.com/jpmorganchase/jupyterlab_templates/blob/main/jupyterlab_templates/extension.py#L24,-- if there is a file/folder that is not readable by the template, that code will just error out, crashing the whole template system.

If we add some IO / permission checking / handling there, for example, just skip the files / folders we don't have permission to read, that will make the whole system much more stable.

kdzhao avatar Oct 29 '21 05:10 kdzhao