SystemError: unknown opcode with "language.find" error after accessing to Seafile web interface

After starting Seafile server - I got the error in logs after trying to access web interface:

==> ./seahub_django_request.log <==
2018-01-22 09:07:38,374 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /
Traceback (most recent call last):
  File "/opt/seafile-server/seafile-server-6.0.8/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/core/handlers/base.py", line 108, in get_response
    response = middleware_method(request)
  File "/opt/seafile-server/seafile-server-6.0.8/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/middleware/locale.py", line 32, in process_request
    request, check_path=check_path)
  File "/opt/seafile-server/seafile-server-6.0.8/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/utils/translation/__init__.py", line 198, in get_language_from_request
    return _trans.get_language_from_request(request, check_path)
  File "/opt/seafile-server/seafile-server-6.0.8/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/utils/translation/trans_real.py", line 523, in get_language_from_request
    return get_supported_language_variant(accept_lang)
  File "/opt/seafile-server/seafile-server-6.0.8/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/utils/lru_cache.py", line 125, in wrapper
    result = user_function(*args, **kwds)
  File "/opt/seafile-server/seafile-server-6.0.8/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/utils/translation/trans_real.py", line 457, in get_supported_language_variant
    if code in supported_lang_codes and check_for_language(code):
  File "/opt/seafile-server/seafile-server-6.0.8/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/utils/lru_cache.py", line 125, in wrapper
    result = user_function(*args, **kwds)
  File "/opt/seafile-server/seafile-server-6.0.8/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/utils/translation/trans_real.py", line 419, in check_for_language
    if gettext_module.find('django', path, [to_locale(lang_code)]) is not None:
  File "/opt/seafile-server/seafile-server-6.0.8/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/utils/translation/trans_real.py", line 75, in to_locale
    p = language.find('-')
SystemError: unknown opcode

In web page I see the text:


Page unavailable

Sorry, but the requested page is unavailable due to a server hiccup.

Our engineers have been notified, so check back later.

Webdav access to storage works normally.

OS is Ubuntu 16.04 amd64.

Seems this is some problem with the language, but I can’t find any configuration variables about language. How can I fix this problem?

Seems the problem with broken Seafile Web interface is in another place - I have found dead symlink seafile-server/seahub-data/avatars to ../../avatars that not exists. After I remove symlink and create normal folder - all works well.