Open brian-c-ogorman opened 6 months ago
I have learned a bit more on this. I think my issue comes from this existence check here.
It seems that paths returned by:
from jupyter_core.paths import jupyter_path
jupyter_path("nbextensions")
do not always exist (which is why the function is calling exists()
). In my case, the file that was being checked (/usr/local/share/jupyter/nbextensions/jupyter-vuetify/extension.js
) did not exist.
However, pathlib.Path.exists()
will raise a PermissionError
if it does not have permission to read from the location/file. And in my case, my permissions to /usr/local/share
were set to:
drwx------
It worked when I updated the directory permissions to:
drwxr-xr-x
While this does solve my issue, I think the code could be more robust here. If the user doesn't have permission to a folder or file, shouldn't that be considered the same as "does not exist"? That is, maybe the call to exists()
should be wrapped in a try
/except PermissionError
, and then ignore paths/files that the user does not have permission to?
Hi Brian,
thank you for the detailed explanation. This should be a relative easy fix (although difficult to test in CI).
Regards,
Maarten
Do you feel comfortable opening a PR for this? https://solara.dev/documentation/advanced/development/setup should guide you though it.
Hi @maartenbreddels, sure, I'd like to give it a try 🙂. I might need some guidance on the testing bit.
I just tried setting up a development environment, but I ran into some issues creating a virtual environment from requirements-dev.txt
. The development setup instructions don't specify which version of Python to use, so I tried both Python 3.9 and 3.10, but I had issues with both.
With Python 3.9:
ERROR: Ignored the following versions that require a different python version: 0.10.6 Requires-Python >=2.7, <3.6; 0.10.7 Requires-Python >=2.7, <3.6; 8.19.0 Requires-Python >=3.10; 8.20.0 Requires-Python >=3.10; 8.21.0 Requires-Python >=3.10; 8.22.0 Requires-Python >=3.10; 8.22.1 Requires-Python >=3.10; 8.22.2 Requires-Python >=3.10; 8.23.0 Requires-Python >=3.10; 8.24.0 Requires-Python >=3.10
ERROR: Could not find a version that satisfies the requirement pytest-ipywidgets==1.32.1; extra == "pytest" (from solara[pytest]) (from versions: 1.31.0)
ERROR: No matching distribution found for pytest-ipywidgets==1.32.1; extra == "pytest"
With Python 3.10:
ERROR: Ignored the following versions that require a different python version: 0.10.6 Requires-Python >=2.7, <3.6; 0.10.7 Requires-Python >=2.7, <3.6
ERROR: Could not find a version that satisfies the requirement pytest-ipywidgets==1.32.1; extra == "pytest" (from solara[pytest]) (from versions: 1.31.0)
ERROR: No matching distribution found for pytest-ipywidgets==1.32.1; extra == "pytest"
I'm not sure if it is okay to ignore these?
Hey @brian-c-ogorman!
It looks like pytest-ipywidgets
hasn't been released for the last couple releases we've done (it should always release when we release solara
). We'll get the releases out ASAP.
@brian-c-ogorman the dev install should work now!
I'm getting the following error when attempting to run Solara with version 1.29+:
Everything works fine on 1.28.0 though. I started a thread in the discord questions channel, but it seems like an issue might be more appropriate.
This is the logging output with the stacktrace:
It looks like it is related to this change, though whether that change is the cause or simply exposed the issue, I do not know.