Failed to run the container due to FileNotFoundError error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 450
- Forks
- 111
- PR merge metrics
- No merged PRs in 30d
Description
Hi. I am trying to run this tools with both docker and podman, but keep having this issue
Version: 0.7.20
asu-0720-janitor-1 | Traceback (most recent call last):
asu-0720-janitor-1 | File "/usr/local/lib/python3.10/pathlib.py", line 1175, in mkdir
asu-0720-janitor-1 | Loading /etc/asu/config.py
asu-0720-janitor-1 | self._accessor.mkdir(self, mode)
asu-0720-janitor-1 | FileNotFoundError: [Errno 2] No such file or directory: '/home/build/asu/public/json/v1'
asu-0720-janitor-1 |
asu-0720-janitor-1 | During handling of the above exception, another exception occurred:
asu-0720-janitor-1 |
asu-0720-janitor-1 | Traceback (most recent call last):
asu-0720-janitor-1 | File "/home/build/.local/bin/flask", line 8, in <module>
asu-0720-janitor-1 | sys.exit(main())
asu-0720-janitor-1 | File "/home/build/.local/lib/python3.10/site-packages/flask/cli.py", line 1050, in main
asu-0720-janitor-1 | cli.main()
asu-0720-janitor-1 | File "/home/build/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
asu-0720-janitor-1 | rv = self.invoke(ctx)
asu-0720-janitor-1 | File "/home/build/.local/lib/python3.10/site-packages/click/core.py", line 1651, in invoke
asu-0720-janitor-1 | cmd_name, cmd, args = self.resolve_command(ctx, args)
asu-0720-janitor-1 | File "/home/build/.local/lib/python3.10/site-packages/click/core.py", line 1698, in resolve_command
asu-0720-janitor-1 | cmd = self.get_command(ctx, cmd_name)
asu-0720-janitor-1 | File "/home/build/.local/lib/python3.10/site-packages/flask/cli.py", line 578, in get_command
asu-0720-janitor-1 | app = info.load_app()
asu-0720-janitor-1 | File "/home/build/.local/lib/python3.10/site-packages/flask/cli.py", line 308, in load_app
asu-0720-janitor-1 | app = locate_app(import_name, name)
asu-0720-janitor-1 | File "/home/build/.local/lib/python3.10/site-packages/flask/cli.py", line 235, in locate_app
asu-0720-janitor-1 | return find_best_app(module)
asu-0720-janitor-1 | File "/home/build/.local/lib/python3.10/site-packages/flask/cli.py", line 63, in find_best_app
asu-0720-janitor-1 | app = app_factory()
asu-0720-janitor-1 | File "/home/build/.local/lib/python3.10/site-packages/asu/asu.py", line 61, in create_app
asu-0720-janitor-1 | app.config[option].mkdir(parents=True, exist_ok=True)
asu-0720-janitor-1 | File "/usr/local/lib/python3.10/pathlib.py", line 1179, in mkdir
asu-0720-janitor-1 | self.parent.mkdir(parents=True, exist_ok=True)
asu-0720-janitor-1 | File "/usr/local/lib/python3.10/pathlib.py", line 1175, in mkdir
asu-0720-janitor-1 | self._accessor.mkdir(self, mode)
asu-0720-janitor-1 | PermissionError: [Errno 13] Permission denied: '/home/build/asu/public/json'
asu-0720-server-1 | [2023-05-31 00:28:40 +0000] [9] [ERROR] Exception in worker process
asu-0720-server-1 | Traceback (most recent call last):
asu-0720-server-1 | File "/usr/local/lib/python3.10/pathlib.py", line 1175, in mkdir
asu-0720-server-1 | self._accessor.mkdir(self, mode)
asu-0720-server-1 | FileNotFoundError: [Errno 2] No such file or directory: '/home/build/asu/public/json/v1'
asu-0720-server-1 |
asu-0720-server-1 | During handling of the above exception, another exception occurred:
asu-0720-server-1 |
asu-0720-server-1 | Traceback (most recent call last):
asu-0720-server-1 | File "/home/build/.local/lib/python3.10/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
asu-0720-server-1 | worker.init_process()
asu-0720-server-1 | File "/home/build/.local/lib/python3.10/site-packages/gunicorn/workers/base.py", line 134, in init_process
asu-0720-server-1 | self.load_wsgi()
asu-0720-server-1 | File "/home/build/.local/lib/python3.10/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
asu-0720-server-1 | self.wsgi = self.app.wsgi()
asu-0720-server-1 | File "/home/build/.local/lib/python3.10/site-packages/gunicorn/app/base.py", line 67, in wsgi
asu-0720-server-1 | self.callable = self.load()
asu-0720-server-1 | File "/home/build/.local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
asu-0720-server-1 | return self.load_wsgiapp()
asu-0720-server-1 | File "/home/build/.local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
asu-0720-server-1 | return util.import_app(self.app_uri)
asu-0720-server-1 | File "/home/build/.local/lib/python3.10/site-packages/gunicorn/util.py", line 412, in import_app
asu-0720-server-1 | app = app(*args, **kwargs)
asu-0720-server-1 | File "/home/build/.local/lib/python3.10/site-packages/asu/asu.py", line 61, in create_app
asu-0720-server-1 | app.config[option].mkdir(parents=True, exist_ok=True)
asu-0720-server-1 | File "/usr/local/lib/python3.10/pathlib.py", line 1179, in mkdir
asu-0720-server-1 | self.parent.mkdir(parents=True, exist_ok=True)
asu-0720-server-1 | File "/usr/local/lib/python3.10/pathlib.py", line 1175, in mkdir
asu-0720-server-1 | self._accessor.mkdir(self, mode)
asu-0720-server-1 | PermissionError: [Errno 13] Permission denied: '/home/build/asu/public/json'
asu-0720-server-1 | [2023-05-31 00:28:40 +0000] [9] [INFO] Worker exiting (pid: 9)
I have created ./asu-service/public/, but somehow it keep not having permission to create subdirectory in it. I manually created subdirectories in the error, but it keeps asking for more that I decided to stop doing that.
Full log is in screenshot below
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with asu/asu.py at create_app, line 61, and inspect the /etc/asu/config.py settings that resolve to /home/build/asu/public/json/v1. Reproduce the Docker or Podman startup, then verify the container can initialize without FileNotFoundError or PermissionError while creating its required public directories.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, flask, python
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100