[GH-ISSUE #268] I have trouble in running django command when using docker #214

Closed
opened 2026-02-25 21:31:28 +03:00 by kerem · 0 comments
Owner

Originally created by @oussama-he on GitHub (Dec 23, 2020).
Original GitHub issue: https://github.com/ciur/papermerge/issues/268

Originally assigned to: @ciur on GitHub.

Description
I recently installed papermerge on my machine using docker like this:

git clone https://github.com/ciur/papermerge
cd papermerge/docker/1.4
docker-compose up

This worked for me, I can access the site on the browser.
But when I try to execute a command in the terminal like this: docker-compose run app django-admin shell I get the prompt, but when I try to do something like this:

from django.utils import timezone
timezone.now()

I get this error when hit Enter after the second line:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/opt/app/.venv/lib/python3.8/site-packages/django/utils/timezone.py", line 228, in now
    if settings.USE_TZ:
  File "/opt/app/.venv/lib/python3.8/site-packages/django/conf/__init__.py", line 76, in __getattr__
    self._setup(name)
  File "/opt/app/.venv/lib/python3.8/site-packages/django/conf/__init__.py", line 63, in _setup
    self._wrapped = Settings(settings_module)
  File "/opt/app/.venv/lib/python3.8/site-packages/django/conf/__init__.py", line 142, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'config'

Info:

  • OS: Linux Mint 19.3
  • Papermerge Version 1.4
Originally created by @oussama-he on GitHub (Dec 23, 2020). Original GitHub issue: https://github.com/ciur/papermerge/issues/268 Originally assigned to: @ciur on GitHub. **Description** I recently installed papermerge on my machine using docker like this: ``` git clone https://github.com/ciur/papermerge cd papermerge/docker/1.4 docker-compose up ``` This worked for me, I can access the site on the browser. But when I try to execute a command in the terminal like this: `docker-compose run app django-admin shell` I get the prompt, but when I try to do something like this: ``` from django.utils import timezone timezone.now() ``` I get this error when hit Enter after the second line: ``` Traceback (most recent call last): File "<console>", line 1, in <module> File "/opt/app/.venv/lib/python3.8/site-packages/django/utils/timezone.py", line 228, in now if settings.USE_TZ: File "/opt/app/.venv/lib/python3.8/site-packages/django/conf/__init__.py", line 76, in __getattr__ self._setup(name) File "/opt/app/.venv/lib/python3.8/site-packages/django/conf/__init__.py", line 63, in _setup self._wrapped = Settings(settings_module) File "/opt/app/.venv/lib/python3.8/site-packages/django/conf/__init__.py", line 142, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked ModuleNotFoundError: No module named 'config' ``` **Info:** - OS: Linux Mint 19.3 - Papermerge Version 1.4
kerem 2026-02-25 21:31:28 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/papermerge#214
No description provided.