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

FileNotFoundError: [Errno 2] No such file or directory: '/app/models' #24

Open
chaukegunjan6969 opened this issue Feb 20, 2024 · 0 comments

Comments

@chaukegunjan6969
Copy link

=> ERROR [stage-1 10/12] RUN python manage.py collectstatic --noinput 1.5s

[stage-1 10/12] RUN python manage.py collectstatic --noinput:
1.353 Traceback (most recent call last):
1.353 File "manage.py", line 21, in
1.353 main()
1.353 File "manage.py", line 17, in main
1.353 execute_from_command_line(sys.argv)
1.353 File "/usr/local/lib/python3.6/site-packages/django/core/management/init.py", line 401, in execute_from_command_line
1.353 utility.execute()
1.353 File "/usr/local/lib/python3.6/site-packages/django/core/management/init.py", line 395, in execute
1.353 self.fetch_command(subcommand).run_from_argv(self.argv)
1.353 File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 328, in run_from_argv
1.354 self.execute(*args, **cmd_options)
1.354 File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 369, in execute
1.354 output = self.handle(*args, **options)
1.354 File "/usr/local/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 187, in handle
1.354 collected = self.collect()
1.354 File "/usr/local/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 104, in collect
1.354 for path, storage in finder.list(self.ignore_patterns):
1.354 File "/usr/local/lib/python3.6/site-packages/django/contrib/staticfiles/finders.py", line 130, in list
1.355 for path in utils.get_files(storage, ignore_patterns):
1.355 File "/usr/local/lib/python3.6/site-packages/django/contrib/staticfiles/utils.py", line 23, in get_files
1.355 directories, files = storage.listdir(location)
1.355 File "/usr/local/lib/python3.6/site-packages/django/core/files/storage.py", line 316, in listdir
1.355 for entry in os.scandir(path):
1.355 FileNotFoundError: [Errno 2] No such file or directory: '/app/models'


Dockerfile:17

15 | RUN pip install -r requirements.txt
16 | COPY . /app
17 | >>> RUN python manage.py collectstatic --noinput
18 |
19 | RUN pip install gunicorn

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

1 participant