mayan.apps.logging.middleware.error

When things don't work as they should.
Post Reply
amphetamine
Posts: 47
Joined: Sat Jul 04, 2020 8:43 am

mayan.apps.logging.middleware.error

Post by amphetamine »

Version 4.2.5
All file structures seem okay, but no file can be displayed (red cross).

Code: Select all

mayan.apps.logging.middleware.error_logging <628687> [ERROR] "process_exception() line 15 Exception caught by request middleware; <WSGIRequest: GET '/api/v4/documents/1377/versions/1169/pages/18152/image/?transformation_0_name=resize&transformation_0_argument__width=800&transformation_0_argument__height=&_hash=b776475b836b053438bcf3d1fba7539aa3036757295ed1ced2dad5a1c3c21eeb'>, expected str, bytes or os.PathLike object, not dict"

Traceback (most recent call last):

  File "/opt/mayan-edms/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in_get_response

    response = wrapped_callback(request,*callback_args, **callback_kwargs)

  File "/opt/mayan-edms/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view

    return view_func(*args, **kwargs)

  File "/opt/mayan-edms/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view

    return self.dispatch(request,*args, **kwargs)

  File "/opt/mayan-edms/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch

    response = self.handle_exception(exc)

  File "/opt/mayan-edms/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception

    self.raise_uncaught_exception(exc)

  File "/opt/mayan-edms/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception

    raise exc

  File "/opt/mayan-edms/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch

    response = handler(request,*args, **kwargs)

  File "/opt/mayan-edms/lib/python3.8/site-packages/rest_framework/generics.py", line 208, in get

    return self.retrieve(request,*args, **kwargs)

  File "/opt/mayan-edms/lib/python3.8/site-packages/mayan/apps/converter/api_view_mixins.py", line 58, in retrieve

    cache_filename = task.get(**kwargs)

  File "/opt/mayan-edms/lib/python3.8/site-packages/celery/result.py", line 223, in get

    return self.backend.wait_for_pending(

  File "/opt/mayan-edms/lib/python3.8/site-packages/celery/backends/asynchronous.py", line 201, in wait_for_pending

    return result.maybe_throw(callback=callback, propagate=propagate)

  File "/opt/mayan-edms/lib/python3.8/site-packages/celery/result.py", line 335, in maybe_throw

    self.throw(value, self._to_remote_traceback(tb))

  File "/opt/mayan-edms/lib/python3.8/site-packages/celery/result.py", line 328, in throw

    self.on_ready.throw(*args, **kwargs)

  File "/opt/mayan-edms/lib/python3.8/site-packages/vine/promises.py", line 234, in throw

    reraise(type(exc), exc, tb)

  File "/opt/mayan-edms/lib/python3.8/site-packages/vine/utils.py", line 30, in reraise

    raise value

TypeError: expected str, bytes or os.PathLike object, not dict

mayan.apps.logging.middleware.error_logging <622383> [ERROR] "process_exception() line 15 Exception caught by request middleware; <WSGIRequest: GET '/api/v4/documents/1377/versions/1169/pages/18153/image/?transformation_0_name=resize&transformation_0_argument__width=800&transformation_0_argument__height=&_hash=b776475b836b053438bcf3d1fba7539aa3036757295ed1ced2dad5a1c3c21eeb'>, expected str, bytes or os.PathLike object, not dict"

Traceback (most recent call last):

  File "/opt/mayan-edms/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in_get_response

    response = wrapped_callback(request,*callback_args, **callback_kwargs)

  File "/opt/mayan-edms/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view

    return view_func(*args, **kwargs)

  File "/opt/mayan-edms/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view

    return self.dispatch(request,*args, **kwargs)

  File "/opt/mayan-edms/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch

    response = self.handle_exception(exc)

  File "/opt/mayan-edms/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception

    self.raise_uncaught_exception(exc)

  File "/opt/mayan-edms/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception

    raise exc

  File "/opt/mayan-edms/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch

    response = handler(request,*args, **kwargs)

  File "/opt/mayan-edms/lib/python3.8/site-packages/rest_framework/generics.py", line 208, in get

    return self.retrieve(request,*args, **kwargs)

  File "/opt/mayan-edms/lib/python3.8/site-packages/mayan/apps/converter/api_view_mixins.py", line 58, in retrieve

    cache_filename = task.get(**kwargs)

  File "/opt/mayan-edms/lib/python3.8/site-packages/celery/result.py", line 223, in get

    return self.backend.wait_for_pending(

  File "/opt/mayan-edms/lib/python3.8/site-packages/celery/backends/asynchronous.py", line 201, in wait_for_pending

    return result.maybe_throw(callback=callback, propagate=propagate)

  File "/opt/mayan-edms/lib/python3.8/site-packages/celery/result.py", line 335, in maybe_throw

    self.throw(value, self._to_remote_traceback(tb))

  File "/opt/mayan-edms/lib/python3.8/site-packages/celery/result.py", line 328, in throw

    self.on_ready.throw(*args, **kwargs)

  File "/opt/mayan-edms/lib/python3.8/site-packages/vine/promises.py", line 234, in throw

    reraise(type(exc), exc, tb)

  File "/opt/mayan-edms/lib/python3.8/site-packages/vine/utils.py", line 30, in reraise

    raise value

TypeError: expected str, bytes or os.PathLike object, not dict
bwakkie
50 Posts
50 Posts
Posts: 70
Joined: Fri Feb 14, 2020 8:28 pm

Re: mayan.apps.logging.middleware.error

Post by bwakkie »

It seems Mayan cannot find your files.

Code: Select all

<WSGIRequest: GET '/api/v4/documents/1377/versions/1169/pages/18152/image/?transformation_0_name=resize&transformation_0_argument__width=800&transformation_0_argument__height=&_hash=b776475b836b053438bcf3d1fba7539aa3036757295ed1ced2dad5a1c3c21eeb'>, expected str, bytes or os.PathLike object, not dict"


Did you check if the DOCUMENTS_CACHE* and DOCUMENTS_STORAGE* server variables are set correctly?

Check out the troubleshooting page: https://docs.mayan-edms.com/parts/troub ... rsions.htm
amphetamine
Posts: 47
Joined: Sat Jul 04, 2020 8:43 am

Re: mayan.apps.logging.middleware.error

Post by amphetamine »

Post Reply