On macOS, a race condition for the jsonschema library may keep JupyterLab from starting

On macOS, I found that a problem with jsonschema-4.20.0 can sometimes keep JupyterLab from starting.

This can happen after a new install if enough time pass for macOS to write a copy of ‘.DS_Store’ to one of the folders created when ‘jsonschema’ is installed. To replicate this issue, see the details here:

One work-around might be to delete the ‘.DS_Store’ file from the schema folder where it generates the error and start Jupyter Lab quickly. I confirmed that it is sufficient to delete all of the '.DS_Store` files from the site-packages folder and then start soon thereafter.

Once JupyterLab starts successfully, caching (perhaps of imports) seems to prevent the problem even after macOS creates a new version of ‘DS.Store’ in the folder.

1 Like