Internal Server Error after upgrade to from 6.2 to 6.3.1

Hello,

I’m experiencing the problem, that Seahub is throwing an “Internal Server Error” after upgrading to 6.3.1. As far as I can say, Seafile is running fine - at least I’m able to connect with WebDav and clients seem to sync.

I was using FastCGI till 6.2, but I have changed to WSGI with 6.3.

First, my nginx configuration:
location /seafile {

		proxy_pass         http://127.0.0.1:8000;
		proxy_set_header   Host $host;
		proxy_set_header   X-Real-IP $remote_addr;
		proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header   X-Forwarded-Host $server_name;
		proxy_read_timeout  1200s;

		# used for view/edit office file via Office Online Server
		client_max_body_size 0;
	}

	location /seafhttp {
		rewrite ^/seafhttp(.*)$ $1 break;
		proxy_pass http://127.0.0.1:8082;
		client_max_body_size 0;
		proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_connect_timeout  36000s;
		proxy_read_timeout  36000s;
		proxy_send_timeout  36000s;
		send_timeout  36000s;
		proxy_request_buffering off;
	}

	location /media {
		root /usr/local/www/haiwen/seafile-server/seahub;
	}

	location /seafdav {

		proxy_pass         http://127.0.0.1:8080;
		proxy_set_header   Host $host;
		proxy_set_header   X-Real-IP $remote_addr;
		proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header   X-Forwarded-Host $server_name;

		client_max_body_size 0;
		proxy_connect_timeout  36000s;
		proxy_read_timeout  36000s;
		proxy_send_timeout  36000s;
		send_timeout  36000s;

		# This option is only available for Nginx >= 1.8.0. See more details below.
		proxy_request_buffering off;

	}

If I access the webinterface, I’m getting an error 500. Looking in the seahub.log, I see this:

2018-08-30 21:18:00,851 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /seafile/api2/ping/
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 244, in _legacy_get_response
    response = middleware_method(request)
  File "/usr/local/lib/python2.7/site-packages/django/middleware/locale.py", line 24, in process_request
    i18n_patterns_used, prefixed_default_language = is_language_prefix_patterns_used(urlconf)
  File "/usr/local/lib/python2.7/site-packages/django/utils/lru_cache.py", line 100, in wrapper
    result = user_function(*args, **kwds)
  File "/usr/local/lib/python2.7/site-packages/django/conf/urls/i18n.py", line 29, in is_language_prefix_patterns_used
    for url_pattern in get_resolver(urlconf).url_patterns:
  File "/usr/local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/usr/local/lib/python2.7/site-packages/django/urls/resolvers.py", line 405, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/usr/local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/usr/local/lib/python2.7/site-packages/django/urls/resolvers.py", line 398, in urlconf_module
    return import_module(self.urlconf_name)
  File "/usr/local/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/www/haiwen/seafile-server/seahub/seahub/utils/rooturl.py", line 41, in <module>
    url(r'^%s' % settings.SITE_ROOT[1:], include(settings.SITE_ROOT_URLCONF)),
  File "/usr/local/lib/python2.7/site-packages/django/conf/urls/__init__.py", line 50, in include
    urlconf_module = import_module(urlconf_module)
  File "/usr/local/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/www/haiwen/seafile-server/seahub/seahub/urls.py", line 8, in <module>
    from seahub.views.sysadmin import *
  File "/usr/local/www/haiwen/seafile-server/seahub/seahub/views/sysadmin.py", line 88, in <module>
    from seahub.utils.two_factor_auth import has_two_factor_auth
  File "/usr/local/www/haiwen/seafile-server/seahub/seahub/utils/two_factor_auth.py", line 5, in <module>
    from seahub.two_factor.views.login import (
  File "/usr/local/www/haiwen/seafile-server/seahub/seahub/two_factor/views/__init__.py", line 2, in <module>
    from .core import SetupView, BackupTokensView, SetupCompleteView, QRGeneratorView
  File "/usr/local/www/haiwen/seafile-server/seahub/seahub/two_factor/views/core.py", line 31, in <module>
    from seahub.auth.forms import AuthenticationForm
  File "/usr/local/www/haiwen/seafile-server/seahub/seahub/auth/forms.py", line 17, in <module>
    from captcha.fields import CaptchaField
ImportError: No module named fields

First I thought, the fields module is missing, but it’s installed:

# pip list | grep fields
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
fields (5.0.0)
You are using pip version 9.0.3, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

I’m running Python Version 2.7.15.

Any idea what is going wrong here?