Problem with memcache after upgrading seafile from 7.0 to 7.1

I have installed memcached and libmemcached-dev with the package manager from debian 10 and also pylibmc and django-pylibmc with pip3. But seahub does not work with memcache anymore, it gives UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe3 in position 1: ordinal not in range(128) in the log file.
I have to decomment it in conf/seahub_settings.py, then seahub works, but without memcache of course:
#CACHES = {

‘default’: {

‘BACKEND’: ‘django_pylibmc.memcached.PyLibMCCache’,

‘LOCATION’: ‘127.0.0.1:11211’,

}

#}

Memcache worked for years before upgrade. I started using it with seafile 4.x.

log/seahub.log:
2020-09-14 15:15:45,602 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /
Traceback (most recent call last):
File “/var/www/seafbit/seafile-server-7.1.4/seahub/thirdpart/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/var/www/seafbit/seafile-server-7.1.4/seahub/thirdpart/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/var/www/seafbit/seafile-server-7.1.4/seahub/thirdpart/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/var/www/seafbit/seafile-server-7.1.4/seahub/thirdpart/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/var/www/seafbit/seafile-server-7.1.4/seahub/seahub/auth/decorators.py”, line 27, in _wrapped_view
return view_func(request, *args, **kwargs)
File “/var/www/seafbit/seafile-server-7.1.4/seahub/seahub/views/init.py”, line 1167, in react_fake_view
‘additional_about_dialog_links’: ADDITIONAL_ABOUT_DIALOG_LINKS
File “/var/www/seafbit/seafile-server-7.1.4/seahub/thirdpart/django/shortcuts.py”, line 30, in render
content = loader.render_to_string(template_name, context, request, using=using)
File “/var/www/seafbit/seafile-server-7.1.4/seahub/thirdpart/django/template/loader.py”, line 68, in render_to_string
return template.render(context, request)
File “/var/www/seafbit/seafile-server-7.1.4/seahub/thirdpart/django/template/backends/django.py”, line 66, in render
return self.template.render(context)
File “/var/www/seafbit/seafile-server-7.1.4/seahub/thirdpart/django/template/base.py”, line 205, in render
with context.bind_template(self):
File “/usr/lib/python3.7/contextlib.py”, line 112, in enter
return next(self.gen)
File “/var/www/seafbit/seafile-server-7.1.4/seahub/thirdpart/django/template/context.py”, line 263, in bind_template
updates.update(processor(self.request))
File “/var/www/seafbit/seafile-server-7.1.4/seahub/seahub/base/context_processors.py”, line 99, in base
avatar_url, is_default, date_uploaded = api_avatar_url(username, 72)
File “/var/www/seafbit/seafile-server-7.1.4/seahub/seahub/avatar/util.py”, line 42, in cached_func
return cache.get(key) or cache_set(key, func(user, size))
File “/usr/local/lib/python3.7/dist-packages/django_pylibmc/memcached.py”, line 130, in get
return super(PyLibMCCache, self).get(key, default, version)
File “/var/www/seafbit/seafile-server-7.1.4/seahub/thirdpart/django/core/cache/backends/memcached.py”, line 79, in get
val = self._cache.get(key)
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe3 in position 1: ordinal not in range(128)

I have rebooted the server. Problem is solved.

Glad to hear. Please mark post as solved.

I have checke Solution. Is that “mark as solved”?

Yes :+1: