Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run the add-on #3

Open
marciogranzotto opened this issue May 5, 2024 · 2 comments
Open

Can't run the add-on #3

marciogranzotto opened this issue May 5, 2024 · 2 comments

Comments

@marciogranzotto
Copy link

After installing it, I try to run it and I get:

ERROR:    Application startup failed. Exiting.
usermod: no changes
User UID: 1000
User GID: 1000
Starting uvicorn...
INFO:     Started server process [1]
INFO:     Waiting for application startup.
spoolman.env               WARNING  Data directory is not writable, trying to fix it...
ERROR:    Traceback (most recent call last):
  File "/usr/local/lib/python3.11/pathlib.py", line 1116, in mkdir
    os.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/config/addons_config/spoolman'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/routing.py", line 677, in lifespan
    async with self.lifespan_context(app) as maybe_state:
  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/routing.py", line 566, in __aenter__
    await self._router.startup()
  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/routing.py", line 654, in startup
    await handler()
  File "/home/app/spoolman/spoolman/main.py", line 88, in startup
    env.check_write_permissions()
  File "/home/app/spoolman/spoolman/env.py", line 357, in check_write_permissions
    if not chown_dir(get_data_dir()) or not can_write_to_data_dir():
                     ^^^^^^^^^^^^^^
  File "/home/app/spoolman/spoolman/env.py", line 233, in get_data_dir
    data_dir.mkdir(parents=True, exist_ok=True)
  File "/usr/local/lib/python3.11/pathlib.py", line 1125, in mkdir
    if not exist_ok or not self.is_dir():
                           ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/pathlib.py", line 1250, in is_dir
    return S_ISDIR(self.stat().st_mode)
                   ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/pathlib.py", line 1013, in stat
    return os.stat(self, follow_symlinks=follow_symlinks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/config/addons_config/spoolman'
@gschmidl
Copy link
Owner

gschmidl commented May 6, 2024

Hi, did you follow the extra steps in README.md? I've basically made this for myself so it's not convenient yet, sorry,

@AndyL069
Copy link

Had the same problem, fixed it for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants