[GH-ISSUE #4] dependency issues #2

Closed
opened 2026-02-25 21:30:57 +03:00 by kerem · 8 comments
Owner

Originally created by @ebdavison on GitHub (Feb 28, 2020).
Original GitHub issue: https://github.com/ciur/papermerge/issues/4

I am installing the docker version and there are Python dependency issues that are easily resolved but curious as to why they are missing:

  • django-rest-framework
  • django-rest-knox

But, once those are resolved, there are other dependencies that are unresolvable having to do with pdftk:

papermerge_service | ImportError: cannot import name 'pdftk' from 'pmworker' (/usr/local/lib/python3.7/dist-packages/pmworker/__init__.py)
papermerge_service | Traceback (most recent call last):
papermerge_service |   File "manage.py", line 24, in <module>
papermerge_service |     execute_from_command_line(sys.argv)
papermerge_service |   File "/usr/local/lib/python3.7/dist-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
papermerge_service |     utility.execute()
papermerge_service |   File "/usr/local/lib/python3.7/dist-packages/django/core/management/__init__.py", line 377, in execute
papermerge_service |     django.setup()
papermerge_service |   File "/usr/local/lib/python3.7/dist-packages/django/__init__.py", line 24, in setup
papermerge_service |     apps.populate(settings.INSTALLED_APPS)
papermerge_service |   File "/usr/local/lib/python3.7/dist-packages/django/apps/registry.py", line 114, in populate
papermerge_service |     app_config.import_models()
papermerge_service |   File "/usr/local/lib/python3.7/dist-packages/django/apps/config.py", line 211, in import_models
papermerge_service |     self.models_module = import_module(models_module_name)
papermerge_service |   File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
papermerge_service |     return _bootstrap._gcd_import(name[level:], package, level)
papermerge_service |   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
papermerge_service |   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
papermerge_service |   File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
papermerge_service |   File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
papermerge_service |   File "<frozen importlib._bootstrap_external>", line 728, in exec_module
papermerge_service |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
papermerge_service |   File "/opt/papermerge/papermerge/core/models.py", line 27, in <module>
papermerge_service |     from pmworker import pdftk
papermerge_service | ImportError: cannot import name 'pdftk' from 'pmworker' (/usr/local/lib/python3.7/dist-packages/pmworker/__init__.py)

In digging through the pmworker files, I do not see a pdftk function or class that could be imported.

Would love to get this to work and give this a proper test drive.

Originally created by @ebdavison on GitHub (Feb 28, 2020). Original GitHub issue: https://github.com/ciur/papermerge/issues/4 I am installing the docker version and there are Python dependency issues that are easily resolved but curious as to why they are missing: - `django-rest-framework` - `django-rest-knox` But, once those are resolved, there are other dependencies that are unresolvable having to do with pdftk: ``` papermerge_service | ImportError: cannot import name 'pdftk' from 'pmworker' (/usr/local/lib/python3.7/dist-packages/pmworker/__init__.py) papermerge_service | Traceback (most recent call last): papermerge_service | File "manage.py", line 24, in <module> papermerge_service | execute_from_command_line(sys.argv) papermerge_service | File "/usr/local/lib/python3.7/dist-packages/django/core/management/__init__.py", line 401, in execute_from_command_line papermerge_service | utility.execute() papermerge_service | File "/usr/local/lib/python3.7/dist-packages/django/core/management/__init__.py", line 377, in execute papermerge_service | django.setup() papermerge_service | File "/usr/local/lib/python3.7/dist-packages/django/__init__.py", line 24, in setup papermerge_service | apps.populate(settings.INSTALLED_APPS) papermerge_service | File "/usr/local/lib/python3.7/dist-packages/django/apps/registry.py", line 114, in populate papermerge_service | app_config.import_models() papermerge_service | File "/usr/local/lib/python3.7/dist-packages/django/apps/config.py", line 211, in import_models papermerge_service | self.models_module = import_module(models_module_name) papermerge_service | File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module papermerge_service | return _bootstrap._gcd_import(name[level:], package, level) papermerge_service | File "<frozen importlib._bootstrap>", line 1006, in _gcd_import papermerge_service | File "<frozen importlib._bootstrap>", line 983, in _find_and_load papermerge_service | File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked papermerge_service | File "<frozen importlib._bootstrap>", line 677, in _load_unlocked papermerge_service | File "<frozen importlib._bootstrap_external>", line 728, in exec_module papermerge_service | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed papermerge_service | File "/opt/papermerge/papermerge/core/models.py", line 27, in <module> papermerge_service | from pmworker import pdftk papermerge_service | ImportError: cannot import name 'pdftk' from 'pmworker' (/usr/local/lib/python3.7/dist-packages/pmworker/__init__.py) ``` In digging through the pmworker files, I do not see a pdftk function or class that could be imported. Would love to get this to work and give this a proper test drive.
kerem closed this issue 2026-02-25 21:30:57 +03:00
Author
Owner

@ciur commented on GitHub (Feb 29, 2020):

The problem is that in docker image git pulls from master branch - which is main development branch. Recently I started a proper branching/versioning/tagging. Anyway, the latest stable version is tagged with v1.1.0 (branch stable/1.1.x).
My fault is that I did not update documentation. I will fix this today.

<!-- gh-comment-id:592892840 --> @ciur commented on GitHub (Feb 29, 2020): The problem is that in docker image git pulls from master branch - which is main development branch. Recently I started a proper branching/versioning/tagging. Anyway, the latest stable version is tagged with v1.1.0 (branch stable/1.1.x). My fault is that I did not update documentation. I will fix this today.
Author
Owner

@ciur commented on GitHub (Feb 29, 2020):

Hey, I am really glad that you want to experiment with papermerge!

I added documentation about branching model I use. A picture is worth a thousand words.

I updated docker files on both master branch and stable/1.1.x branches. Now docker file will pull sources from versions tagged with v1.1.0.

@ebdavison please try again, if it is OK, I will close the issue.

<!-- gh-comment-id:592923220 --> @ciur commented on GitHub (Feb 29, 2020): Hey, I am really glad that you want to experiment with papermerge! I added documentation about branching model I use. [A picture is worth a thousand words](https://papermerge.readthedocs.io/en/latest/developers_guide/branching.html). [I updated docker files ](https://github.com/ciur/papermerge/commit/c1b29308f33f954fe64707724c10ea13a7155f7e) on both **master** branch and **stable/1.1.x** branches. Now docker file will pull sources from versions tagged with v1.1.0. @ebdavison please try again, if it is OK, I will close the issue.
Author
Owner

@ebdavison commented on GitHub (Mar 2, 2020):

I had already tried again by modifying the docker compose file that manually telling it to use v1.1.0 and that was successful. I have not yet tried a fresh pull from the repo yet.

<!-- gh-comment-id:593227354 --> @ebdavison commented on GitHub (Mar 2, 2020): I had already tried again by modifying the docker compose file that manually telling it to use `v1.1.0` and that was successful. I have not yet tried a fresh pull from the repo yet.
Author
Owner

@ciur commented on GitHub (Mar 2, 2020):

@ebdavison great! thanks!

<!-- gh-comment-id:593232091 --> @ciur commented on GitHub (Mar 2, 2020): @ebdavison great! thanks!
Author
Owner

@lucaz82 commented on GitHub (Mar 2, 2020):

Hey I cloned your repo last friday and today.

Building the containers works fine I suppose but upon starting the papermerge_service container exits with Exit 1 and says standard_init_linux.go:211: exec user process caused "no such file or directory"

I'm using docker desktop on windows

<!-- gh-comment-id:593253285 --> @lucaz82 commented on GitHub (Mar 2, 2020): Hey I cloned your repo last friday and today. Building the containers works fine I suppose but upon starting the papermerge_service container exits with `Exit 1` and says `standard_init_linux.go:211: exec user process caused "no such file or directory"` I'm using docker desktop on windows
Author
Owner

@ciur commented on GitHub (Mar 2, 2020):

@lucaz82, may I ask you for little help ? I just don't have a real windows machine (Virtual Box might not be really same scenario) and I want to ask you for help with this one. I googled around your error message and found this and this.

@lucaz82 could you please try those solutions (run dos2unix, or maybe change entry point in app.dockerfile from ENTRYPOINT ["/opt/entrypoint.sh"] to "ENTRYPOINT ["sh","/opt/entrypoint.sh"]" or "ENTRYPOINT ["bash","/opt/entrypoint.sh"]" ) and tell me if it fixes docker + windows issue?

<!-- gh-comment-id:593319348 --> @ciur commented on GitHub (Mar 2, 2020): @lucaz82, may I ask you for little help ? I just don't have a real windows machine (Virtual Box might not be really same scenario) and I want to ask you for help with this one. I googled around your error message and found [this](https://stackoverflow.com/questions/51508150/standard-init-linux-go190-exec-user-process-caused-no-such-file-or-directory) and [this](https://forums.docker.com/t/standard-init-linux-go-175-exec-user-process-caused-no-such-file/20025/2). @lucaz82 could you please try those solutions (run dos2unix, or maybe change entry point in app.dockerfile from ENTRYPOINT ["/opt/entrypoint.sh"] to "ENTRYPOINT ["sh","/opt/entrypoint.sh"]" or "ENTRYPOINT ["bash","/opt/entrypoint.sh"]" ) and tell me if it fixes docker + windows issue?
Author
Owner

@lucaz82 commented on GitHub (Mar 3, 2020):

@ciur So I just reinstalled docker completely and tried the ENTRYPOINT ["sh","/opt/entrypoint.sh"] & ENTRYPOINT ["bash","/opt/entrypoint.sh"]
This time the service container starts up but throws following errors

: not foundoint.sh: 2:

/opt/entrypoint.sh: 4: cd: can't cd to /opt/papermerge

python3: can't open file 'manage.py': [Errno 2] No such file or directory

cat: create_user.py: No such file or directory

: not foundoint.sh: 8:

Watching for file changes with StatReloader

Performing system checks...

I also changed the coding of the file to LF
Maybe I've find some time later this day to find out more but for now I'll have to work.
We could also just raise a new issue from this part on as I tought the problem was related to the dependency issue

<!-- gh-comment-id:593845836 --> @lucaz82 commented on GitHub (Mar 3, 2020): @ciur So I just reinstalled docker completely and tried the ENTRYPOINT ["sh","/opt/entrypoint.sh"] & ENTRYPOINT ["bash","/opt/entrypoint.sh"] This time the service container starts up but throws following errors ``` : not foundoint.sh: 2: /opt/entrypoint.sh: 4: cd: can't cd to /opt/papermerge python3: can't open file 'manage.py': [Errno 2] No such file or directory cat: create_user.py: No such file or directory : not foundoint.sh: 8: Watching for file changes with StatReloader Performing system checks... ``` I also changed the coding of the file to LF Maybe I've find some time later this day to find out more but for now I'll have to work. We could also just raise a new issue from this part on as I tought the problem was related to the dependency issue
Author
Owner

@ciur commented on GitHub (Mar 3, 2020):

Sounds fair to me. I close this issue and open another one - Docker + Windows specific.

<!-- gh-comment-id:593918116 --> @ciur commented on GitHub (Mar 3, 2020): Sounds fair to me. I close this issue and open another one - Docker + Windows specific.
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#2
No description provided.