S
Solara4mo ago
Brian

PermissionError for nbextensions on startup with v1.29+

hi all, i've been trying out solara for the past month or so. i was using v1.28 with no issues. today i tried upgrading and i've been having trouble getting things running on any higher version. i know that there were significant changes to the packaging starting with v1.31, but at this point i can't even upgrade to v1.29. i'm getting a PermissionError on startup:
PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter/nbextensions/jupyter-vuetify/extension.js'
PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter/nbextensions/jupyter-vuetify/extension.js'
i'm creating a multi-page app, and i'm pip-installing in editable mode (since i'm actively developing) from a pyproject.toml file. i have an environment with solara v1.28.0 and one with v1.29.1. it works with v1.28, but i get the error with v1.29 (and v1.30). any help would be appreciated!
6 Replies
Brian
Brian4mo ago
i've diffed the outputs from pip freeze for my two environments, and the only difference is the version of solara (and solara-assets).
Brian
Brian4mo ago
the logging output with stacktrace is:
Brian
Brian4mo ago
i can create an issue in GitHub if that's more appropriate. i think maybe this change is the culprit. I just created this issue for this.
Monty Python
Monty Python4mo ago
brian-c-ogorman
<:issue_open:882464248951877682> [widgetti/solara] PermissionError for nbextensions on startup with v1.29+
I'm getting the following error when attempting to run Solara with version 1.29+:
PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter/nbextensions/jupyter-vuetify/extension.js'
PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter/nbextensions/jupyter-vuetify/extension.js'
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: ``` 2024-04-18 16:04:17,505 [INFO ] [79501] solara.server.app: app-status check: 81d2c0e7-a41d-4c15-a4b5-8d12eca8cf73 app not started 2024-04-18 16:04:17,527 [INFO ] [79501] solara.server.app: Shut down virtual kernel: 81d2c0e7-a41d-4c15-a4b5-8d12eca8cf73 2024-04-18 16:04:17,574 [INFO ] [79501] solara.server.app: Disconnect page df0beeeb-043e-4b84-b676-2e470826b8ba for kernel 81d2c0e7-a41d-4c15-a4b5-8d12eca8cf73 2024-04-18 16:04:17,576 [INFO ] [79501] solara.server.app: Scheduling kernel cull, will wait for max 86400.0 before shutting down the virtual kernel 81d2c0e7-a41d-4c15-a4b5-8d12eca8cf73 2024-04-18 16:04:20,734 [ERROR] [79501] uvicorn.error: Exception in ASGI application Traceback (most recent call last): File "/.../venv/solara-1-29/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 407, in run_asgi result = await app( # type: ignore[func-returns-value] File "/.../venv/solara-1-29/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 69, in call return await self.app(scope, receive, send) File "/.../venv/solara-1-29/lib/python3.10/site-packages/starlette/applications.py", line 123, in call await self.middleware_stack(scope, receive, send) File "/.../venv/solara-1-29/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in call raise exc File "/.../venv/solara-1-29/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in call await self.app(scope, receive, _send) File "/.../venv/solara-1-29/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in call await responder(scope, receive, send) File "/.../venv/solara-1-29/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in call await self.app(scope, receive, self.send_with_gzip) File "/.../venv/solara-1-29/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/.../venv/solara-1-29/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/.../venv/solara-1-29/lib/python3....
Created
Brian
Brian4mo ago
i think i have resolved my issue -- by chmod-ing my /usr/local/share directory to allow more access than was initially present. however, i mentioned in the issue that i raised that the path that was causing trouble did not even exist. so i wonder if the code could be improved by catching PermissionErrors -- if the user doesn't have permission to the directory or file, that is basically the same as "does not exist".
MaartenBreddels
MaartenBreddels4mo ago
Thank you for all the detail! we'll continue from github