V4.5 - no workflow preview image

Hi,

I’m testing version 4.5. at the moment and there seems to be an issue with the workflow image preview.

The html img-tag shows just the description “Workflow tempalte preview image” instead of the picture itsself. The http-request for the image seems to be ok but it returns a status code 500.

http://192.168.1.15/api/v4/workflow_templates/1/image/?_hash=70a3bdc8ca45dd1c22ffb11d7c2124c43f549e74e9f3f2b19c3eaa9c664aa029

The log message is the following:

[2023-09-15 09:37:36,835: ERROR/ForkPoolWorker-2] Task mayan.apps.converter.tasks.task_content_object_image_generate[dcab7ac4-862d-4768-89b2-19eeedb9dc2b] raised unexpected: AttributeError("'LoggingProxy' object has no attribute 'encoding'")
mayan-app-1         | Traceback (most recent call last):
mayan-app-1         |   File "/opt/mayan-edms/lib/python3.11/site-packages/mayan/apps/document_states/models/workflow_model_mixins.py", line 68, in generate_image
mayan-app-1         |     self.cache_partition.get_file(filename=cache_filename)
mayan-app-1         |   File "/opt/mayan-edms/lib/python3.11/site-packages/mayan/apps/file_caching/model_mixins.py", line 257, in get_file
mayan-app-1         |     return self.files.get(filename=filename)
mayan-app-1         |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
mayan-app-1         |   File "/opt/mayan-edms/lib/python3.11/site-packages/django/db/models/manager.py", line 85, in manager_method
mayan-app-1         |     return getattr(self.get_queryset(), name)(*args, **kwargs)
mayan-app-1         |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
mayan-app-1         |   File "/opt/mayan-edms/lib/python3.11/site-packages/django/db/models/query.py", line 435, in get
mayan-app-1         |     raise self.model.DoesNotExist(
mayan-app-1         | mayan.apps.file_caching.models.CachePartitionFile.DoesNotExist: CachePartitionFile matching query does not exist.
mayan-app-1         |
mayan-app-1         | During handling of the above exception, another exception occurred:
mayan-app-1         |
mayan-app-1         | Traceback (most recent call last):
mayan-app-1         |   File "/opt/mayan-edms/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_taskmayan-app-1         |     R = retval = fun(*args, **kwargs)
mayan-app-1         |                  ^^^^^^^^^^^^^^^^^^^^
mayan-app-1         |   File "/opt/mayan-edms/lib/python3.11/site-packages/celery/app/trace.py", line 760, in __protected_call__
mayan-app-1         |     return self.run(*args, **kwargs)
mayan-app-1         |            ^^^^^^^^^^^^^^^^^^^^^^^^^
mayan-app-1         |   File "/opt/mayan-edms/lib/python3.11/site-packages/mayan/apps/converter/tasks.py", line 46, in task_content_object_image_generate
mayan-app-1         |     return obj.generate_image(
mayan-app-1         |            ^^^^^^^^^^^^^^^^^^^
mayan-app-1         |   File "/opt/mayan-edms/lib/python3.11/site-packages/mayan/apps/document_states/models/workflow_model_mixins.py", line 74, in generate_image
mayan-app-1         |     image = self.render()
mayan-app-1         |             ^^^^^^^^^^^^^
mayan-app-1         |   File "/opt/mayan-edms/lib/python3.11/site-packages/mayan/apps/document_states/models/workflow_model_mixins.py", line 311, in render
mayan-app-1         |     return diagram.pipe()
mayan-app-1         |            ^^^^^^^^^^^^^^
mayan-app-1         |   File "/opt/mayan-edms/lib/python3.11/site-packages/graphviz/files.py", line 166, in pipe
mayan-app-1         |     out = backend.pipe(self._engine, format, data,
mayan-app-1         |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
mayan-app-1         |   File "/opt/mayan-edms/lib/python3.11/site-packages/graphviz/backend.py", line 268, in pipe
mayan-app-1         |     out, _ = run(cmd, input=data, capture_output=True, check=True, quiet=quiet)
mayan-app-1         |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
mayan-app-1         |   File "/opt/mayan-edms/lib/python3.11/site-packages/graphviz/backend.py", line 180, in run
mayan-app-1         |     err_encoding = sys.stderr.encoding or sys.getdefaultencoding()
mayan-app-1         |                    ^^^^^^^^^^^^^^^^^^^
mayan-app-1         | AttributeError: 'LoggingProxy' object has no attribute 'encoding'

Does anyone else have this issue?

Best regards, Torsten

Hi,

We got another report for this error. Seems to be related to the new Debian base image (Bookworm) that version 4.5 uses.

The error being reported is not the complete error trace due to bugs in either Graphviz or Celery. We’ve tracked the root cause down to a font issue. Solutions are being tested to include in version 4.5.1.

Solved in version 4.5.1 by reseting the font cache on startup.

https://docs.mayan-edms.com/releases/4.5.1.html#workflows

Thanks for the report.

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.