Error in log since Version 3.1.4

When things doesn't work as they should.
Post Reply
rgarcia
Posts: 7
Joined: Sat Sep 01, 2018 9:46 pm

Error in log since Version 3.1.4

Post by rgarcia » Tue Oct 09, 2018 9:27 am

Since Version 3.1.4 I get the following error in the log:

Code: Select all

Traceback (most recent call last):
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/rest_framework/views.py", line 494, in dispatch
    response = self.handle_exception(exc)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/rest_framework/views.py", line 454, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/rest_framework/views.py", line 491, in dispatch
    response = handler(request, *args, **kwargs)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/rest_framework/generics.py", line 210, in get
    return self.retrieve(request, *args, **kwargs)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/rest_framework/mixins.py", line 56, in retrieve
    instance = self.get_object()
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/common/api_views.py", line 27, in get_object
    return Template.get(self.kwargs['name']).render(request=self.request)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/common/classes.py", line 393, in render
    context=context,
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/template/response.py", line 107, in render
    self.content = self.rendered_content
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/template/response.py", line 84, in rendered_content
    content = template.render(context, self._request)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/template/backends/django.py", line 66, in render
    return self.template.render(context)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/template/base.py", line 207, in render
    return self._render(context)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/template/base.py", line 199, in _render
    return self.nodelist.render(context)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
    bit = node.render_annotated(context)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
    return self.render(context)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/template/library.py", line 203, in render
    output = self.func(*resolved_args, **resolved_kwargs)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/navigation/templatetags/navigation_tags.py", line 23, in get_menu_links
    return Menu.get(name).resolve(context=context, source=source, sort_results=sort_results)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/navigation/classes.py", line 243, in resolve
    condition = link.check_condition(context=context)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/navigation/classes.py", line 111, in check_condition
    return self.condition(context=context)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/navigation/utils.py", line 36, in condition
    queryset=Model.objects.all()
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/acls/managers.py", line 161, in filter_by_access
    self.check_access(permissions=permission, user=user, obj=entry)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/acls/managers.py", line 64, in check_access
    permissions=permissions, user=user
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/acls/managers.py", line 57, in check_access
    raise PermissionDenied(_('Insufficient access for: %s') % obj)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/utils/functional.py", line 162, in __mod__
    return six.text_type(self) % rhs
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 48: ordinal not in range(128)

User avatar
rosarior
Posts: 159
Joined: Tue Aug 21, 2018 3:28 am

Re: Error in log since Version 3.1.4

Post by rosarior » Tue Oct 09, 2018 6:24 pm

Taking at look at this. It is going to be hard to diagnose since the log statement itself is not able to print what is causing the problem.

A few questions to get to the root of the cause:

- Direct deployment or Docker?
- Is this as admin or user?
- What language is the user account set for.
- Using ACLs or roles causes this?

Thanks!

rgarcia
Posts: 7
Joined: Sat Sep 01, 2018 9:46 pm

Re: Error in log since Version 3.1.4

Post by rgarcia » Tue Oct 09, 2018 7:25 pm

- Direct deployment or Docker?
Docker

- Is this as admin or user?
admin

- What language is the user account set for.
English

- Using ACLs or roles causes this?
Nope I am using Mayan the most primitiv way. Just using Cabinets to store my uploaded documents. Nothing else.

I copied the error out of the docker log for the container.

User avatar
rosarior
Posts: 159
Joined: Tue Aug 21, 2018 3:28 am

Re: Error in log since Version 3.1.4

Post by rosarior » Wed Oct 10, 2018 2:39 am

Found the issue. Happens when there are multiple browser tabs open and you logout from one of the tabs.

Just release version 3.1.6 with a fix for this. Thanks for reporting.

rgarcia
Posts: 7
Joined: Sat Sep 01, 2018 9:46 pm

Re: Error in log since Version 3.1.4

Post by rgarcia » Wed Oct 10, 2018 6:32 am

Perfect I can confirm the fix works - thanks :)

can be closed

User avatar
rosarior
Posts: 159
Joined: Tue Aug 21, 2018 3:28 am

Re: Error in log since Version 3.1.4

Post by rosarior » Mon Oct 15, 2018 12:50 am

Perfect! Thanks for the feedback.

Post Reply