Skip to content

PermissionError for nbextensions on startup with v1.29+ #611

@brian-c-ogorman

Description

@brian-c-ogorman

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'

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.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/.../venv/solara-1-29/lib/python3.10/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/.../venv/solara-1-29/lib/python3.10/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/.../venv/solara-1-29/lib/python3.10/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/.../venv/solara-1-29/lib/python3.10/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(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.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/.../venv/solara-1-29/lib/python3.10/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
  File "/.../venv/solara-1-29/lib/python3.10/site-packages/solara/server/starlette.py", line 318, in root
    content = server.read_root(request_path, root_path)
  File "/.../venv/solara-1-29/lib/python3.10/site-packages/solara/server/server.py", line 266, in read_root
    nbextensions, nbextensions_hashes = get_nbextensions()
  File "/.../venv/solara-1-29/lib/python3.10/site-packages/solara/cache.py", line 100, in __call__
    value = self.function(*args, **kwargs)
  File "/.../venv/solara-1-29/lib/python3.10/site-packages/solara/server/server.py", line 432, in get_nbextensions
    nbextensions_hashes = {name: hash_extension(name) for name in nbextensions}
  File "/.../venv/solara-1-29/lib/python3.10/site-packages/solara/server/server.py", line 432, in <dictcomp>
    nbextensions_hashes = {name: hash_extension(name) for name in nbextensions}
  File "/.../venv/solara-1-29/lib/python3.10/site-packages/solara/server/server.py", line 424, in hash_extension
    if (directory / (name + ".js")).exists():
  File "~/miniconda3/envs/py310/lib/python3.10/pathlib.py", line 1290, in exists
    self.stat()
  File "~/miniconda3/envs/py310/lib/python3.10/pathlib.py", line 1097, in stat
    return self._accessor.stat(self, follow_symlinks=follow_symlinks)
PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter/nbextensions/jupyter-vuetify/extension.js'

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions