okfde / django-filingcabinet

PDF document viewer Django app
10 stars 3 forks source link

ModuleNotFoundError: No module named 'fc_project' #52

Closed yanhuixie closed 1 year ago

yanhuixie commented 1 year ago

Hi, I cloned the source and followed the "Quickstart with Docker" instruction to build the image, but something went wrong. https://github.com/okfde/django-filingcabinet#quickstart-with-docker Could you tell me how to solve it?

=> ERROR [stage-1 9/9] RUN python ./manage.py collectstatic 2.2s

[stage-1 9/9] RUN python ./manage.py collectstatic:

0 1.759 Traceback (most recent call last):

0 1.759 File "/usr/local/lib/python3.10/site-packages/django/core/management/init.py", line 259, in fetch_command

0 1.759 app_name = commands[subcommand]

0 1.759 KeyError: 'collectstatic'

0 1.760

0 1.760 During handling of the above exception, another exception occurred:

0 1.760

0 1.760 Traceback (most recent call last):

0 1.760 File "/project/./manage.py", line 25, in

0 1.760 main()

0 1.760 File "/project/./manage.py", line 21, in main

0 1.760 execute_from_command_line(sys.argv)

0 1.760 File "/usr/local/lib/python3.10/site-packages/django/core/management/init.py", line 446, in execute_from_command_line

0 1.760 utility.execute()

0 1.760 File "/usr/local/lib/python3.10/site-packages/django/core/management/init.py", line 440, in execute

0 1.760 self.fetch_command(subcommand).run_from_argv(self.argv)

0 1.760 File "/usr/local/lib/python3.10/site-packages/django/core/management/init.py", line 266, in fetch_command

0 1.761 settings.INSTALLED_APPS

0 1.761 File "/usr/local/lib/python3.10/site-packages/django/conf/init.py", line 92, in getattr

0 1.761 self._setup(name)

0 1.761 File "/usr/local/lib/python3.10/site-packages/django/conf/init.py", line 79, in _setup

0 1.761 self._wrapped = Settings(settings_module)

0 1.761 File "/usr/local/lib/python3.10/site-packages/django/conf/init.py", line 190, in init

0 1.761 mod = importlib.import_module(self.SETTINGS_MODULE)

0 1.761 File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module

0 1.761 return _bootstrap._gcd_import(name[level:], package, level)

0 1.761 File "", line 1050, in _gcd_import

0 1.761 File "", line 1027, in _find_and_load

0 1.761 File "", line 992, in _find_and_load_unlocked

0 1.762 File "", line 241, in _call_with_frames_removed

0 1.762 File "", line 1050, in _gcd_import

0 1.762 File "", line 1027, in _find_and_load

0 1.762 File "", line 1004, in _find_and_load_unlocked

0 1.762 ModuleNotFoundError: No module named 'fc_project'


failed to solve: executor failed running [/bin/sh -c python ./manage.py collectstatic]: exit code: 1

yanhuixie commented 1 year ago

It seems that you have moved fc_project from / to /src, but the correlative source haven't been modified. You should not declare "django-filingcabinet" in the requirements-production.txt, that's too old. L10 in the fc_project/urls.py may import urlpatterns but not url_patterns.

stefanw commented 1 year ago

Thanks for reporting! Fixed in latest commits.