You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Seafile version 12.0.7 in a Docker environment.
While having an issue with Seafile (which was a configuration issue on my side), I came across this error in seahub.log:
[2025-01-21 13:58:46] [ERROR] seahub.thumbnail.utils:211 pdf_bytes_to_images [Errno 2] No such file or directory: 'pdftoppm'
[2025-01-21 13:58:46] [ERROR] seahub.thumbnail.utils:239 create_pdf_thumbnails [Errno 2] No such file or directory: '/tmp/c3aecf34.png'
[2025-01-21 13:58:46] [ERROR] django.request:241 log_response Internal Server Error: /thumbnail/d49e13b5-d1d8-498a-86bb-939f9a3674bb/create/
Traceback (most recent call last):
File "/opt/seafile/seafile-server-12.0.7/seahub/seahub/thumbnail/utils.py", line 235, in create_pdf_thumbnails
ret = _create_thumbnail_common(tmp_path, thumbnail_file, size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/seafile/seafile-server-12.0.7/seahub/seahub/thumbnail/utils.py", line 278, in _create_thumbnail_common
image = Image.open(fp)
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/PIL/Image.py", line 3431, in open
fp = builtins.open(filename, "rb")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/c3aecf34.png'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/seafile/seafile-server-12.0.7/seahub/thirdpart/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/seafile/seafile-server-12.0.7/seahub/thirdpart/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/seafile/seafile-server-12.0.7/seahub/seahub/auth/decorators.py", line 69, in _wrapped_view
return view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/seafile/seafile-server-12.0.7/seahub/seahub/thumbnail/views.py", line 59, in thumbnail_create
success, status_code = generate_thumbnail(request, repo_id, size, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/seafile/seafile-server-12.0.7/seahub/seahub/thumbnail/utils.py", line 129, in generate_thumbnail
return create_pdf_thumbnails(repo, file_id, path, size,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/seafile/seafile-server-12.0.7/seahub/seahub/thumbnail/utils.py", line 240, in create_pdf_thumbnails
os.unlink(tmp_path)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/c3aecf34.png'
Upon inspection in source code in seahub/seahub/thumbnail/utils.py, I saw that this was where the error is coming from:
The tool used is pdftoppm. I connected to the seafile container and I noticed that this utility was not installed:
root@:/opt/seafile# pdftoppm
bash: pdftoppm: command not found
So, I installed it (by adding poppler-utils) and now everything is working.
In conclusion, it seems that the Docker image is missing this poppler-utils in order to generate the pdf thumbnails correctly.
That's why I raised the issue here rather than in the Seahub repository.
The text was updated successfully, but these errors were encountered:
Hello,
I'm using Seafile version 12.0.7 in a Docker environment.
While having an issue with Seafile (which was a configuration issue on my side), I came across this error in seahub.log:
Upon inspection in source code in seahub/seahub/thumbnail/utils.py, I saw that this was where the error is coming from:
The tool used is pdftoppm. I connected to the seafile container and I noticed that this utility was not installed:
root@:/opt/seafile# pdftoppm bash: pdftoppm: command not found
So, I installed it (by adding poppler-utils) and now everything is working.
In conclusion, it seems that the Docker image is missing this poppler-utils in order to generate the pdf thumbnails correctly.
That's why I raised the issue here rather than in the Seahub repository.
The text was updated successfully, but these errors were encountered: