Internal Server Error after upgrading 7.1.4 - Raspberry Pi

Hello,

I did the update in version 7.1.4 and since I have an internal error (see below). Can you help me please, I’m lost :frowning: Thanks.

(My configuration is a raspberry under stretch)

2020-05-31 16:37:42,651 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /seafile/api2/repos/
Traceback (most recent call last):
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/django/core/handlers/base.py”, line 244, in _legacy_get_response
response = middleware_method(request)
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/django/middleware/locale.py”, line 24, in process_request
i18n_patterns_used, prefixed_default_language = is_language_prefix_patterns_used(urlconf)
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/django/conf/urls/i18n.py”, line 29, in is_language_prefix_patterns_used
for url_pattern in get_resolver(urlconf).url_patterns:
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/django/utils/functional.py”, line 35, in get
res = instance.dict[self.name] = self.func(instance)
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/django/urls/resolvers.py”, line 407, in url_patterns
patterns = getattr(self.urlconf_module, “urlpatterns”, self.urlconf_module)
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/django/utils/functional.py”, line 35, in get
res = instance.dict[self.name] = self.func(instance)
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/django/urls/resolvers.py”, line 400, in urlconf_module
return import_module(self.urlconf_name)
File “/usr/lib/python3.5/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 986, in _gcd_import
File “”, line 969, in _find_and_load
File “”, line 958, in _find_and_load_unlocked
File “”, line 673, in _load_unlocked
File “”, line 673, in exec_module
File “”, line 222, in _call_with_frames_removed
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/seahub/utils/rooturl.py”, line 41, in
url(r’^%s’ % settings.SITE_ROOT[1:], include(settings.SITE_ROOT_URLCONF)),
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/django/conf/urls/init.py”, line 50, in include
urlconf_module = import_module(urlconf_module)
File “/usr/lib/python3.5/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 986, in _gcd_import
File “”, line 969, in _find_and_load
File “”, line 958, in _find_and_load_unlocked
File “”, line 673, in _load_unlocked
File “”, line 673, in exec_module
File “”, line 222, in _call_with_frames_removed
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/seahub/urls.py”, line 8, in
from seahub.views.sysadmin import *
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/seahub/views/sysadmin.py”, line 13, in
from openpyxl import load_workbook
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/openpyxl/init.py”, line 6, in
from openpyxl.workbook import Workbook
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/openpyxl/workbook/init.py”, line 4, in
from .workbook import Workbook
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/openpyxl/workbook/workbook.py”, line 7, in
from openpyxl.worksheet.worksheet import Worksheet
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/openpyxl/worksheet/worksheet.py”, line 392
return f"{get_column_letter(min_col)}{min_row}:{get_column_letter(max_col)}{max_row}"
^
SyntaxError: invalid syntax

@axstet you can post the same her :slight_smile:

You need python version 3.6 or upwards…

Can you still edit your “release” post? Maybe worth putting it in there in very big letters…

Wow your answer is quick ! :slight_smile:

Sorry, I hadn’t seen that python 3.6 was needed.

I would not have time to test this evening, but I try that tomorrow morning and I come back to you!

Thank you.

Have a good evening.

lol maybe, maybe :love_you_gesture:

Done:

Hello,

I have updated my raspberry pi from stretch to buster then I have downloaded the right version of seafile-server.
I created a symbolic link for python 3.7.
I also launched the build3.sh script
I have read your notes several times, I think miss something but I don’t understand what … :frowning:

Thank you forward to unlight me.

This time I have a new error (see below). Do you have an idea ? Thank you so much for your help.

2020-06-01 11:35:32,161 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /seafile/api2/account/info/
Traceback (most recent call last):
File “/var/www/html/seafile/seafile-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py”, line 88, in _get_transport
transport = self._pool.get(False)
File “/usr/lib/python3.7/queue.py”, line 167, in get
raise Empty
_queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/var/www/html/seafile/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/html/seafile/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/html/seafile/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/html/seafile/seafile-server-7.1.4/seahub/thirdpart/django/views/decorators/csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/django/views/generic/base.py”, line 68, in view
return self.dispatch(request, *args, **kwargs)
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/seahub/api2/base.py”, line 23, in dispatch
response = super(APIView, self).dispatch(*a, **kw)
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/rest_framework/views.py”, line 505, in dispatch
response = self.handle_exception(exc)
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/seahub/api2/base.py”, line 20, in handle_exception
return super(APIView, self).handle_exception(exc)
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/rest_framework/views.py”, line 465, in handle_exception
self.raise_uncaught_exception(exc)
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/rest_framework/views.py”, line 476, in raise_uncaught_exception
raise exc
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/thirdpart/rest_framework/views.py”, line 502, in dispatch
response = handler(request, *args, **kwargs)
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/seahub/api2/views.py”, line 338, in get
return Response(self._get_account_info(request))
File “/var/www/html/seafile/seafile-server-7.1.4/seahub/seahub/api2/views.py”, line 309, in _get_account_info
quota_total = seafile_api.get_user_quota(email)
File “/var/www/html/seafile/seafile-server-7.1.4/seafile/lib/python3.6/site-packages/seaserv/api.py”, line 715, in get_user_quota
return seafserv_threaded_rpc.get_user_quota(username)
File “/var/www/html/seafile/seafile-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/client.py”, line 126, in newfunc
ret_str = self.call_remote_func_sync(fcall_str)
File “/var/www/html/seafile/seafile-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py”, line 100, in call_remote_func_sync
transport = self._get_transport()
File “/var/www/html/seafile/seafile-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py”, line 90, in _get_transport
transport = self._create_transport()
File “/var/www/html/seafile/seafile-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py”, line 83, in _create_transport
transport.connect()
File “/var/www/html/seafile/seafile-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py”, line 47, in connect
self.pipe.connect(self.socket_path)
ConnectionRefusedError: [Errno 111] Connection refused

no, this is only necessary if you want to build the seafile package by yourself. You should download the buster version.

Yes i download the buster version. Do I have to start over?

Hello,
After a simple restart of the RPI it works …
Thanks for your help.
Goodbye.

Wow your answer is quick

Hey guys!

Git the same issue but I additionally installed Python 3.7.4. But seafile and seahub always starts with Python 3 although I updated the alternatives - system wide and user specific. I added alias python='/usr/local/bin/python3.7' to .bashrc on user seafile and on root. Additionally I updated system wide the alternatives to python.

root@canterlot ~ # update-alternatives --list python
/usr/bin/python2.7
/usr/bin/python3.5
/usr/local/bin/python3.7
root@canterlot ~ # update-alternatives --config python
There are 3 choices for the alternative python (providing /usr/bin/python).

  Selection    Path                      Priority   Status
------------------------------------------------------------
  0            /usr/local/bin/python3.7   3         auto mode
  1            /usr/bin/python2.7         1         manual mode
  2            /usr/bin/python3.5         2         manual mode
* 3            /usr/local/bin/python3.7   3         manual mode

Press <enter> to keep the current choice[*], or type selection number:

But seafile/-hub don’t give a fook about the changes an use always py3.5.

root@canterlot ~ # python --version
Python 3.7.3

How can I start seafile and seahub with py3.7?

Did you follow all steps from: Seafile Server 7.1.4 for Raspberry Pi is ready! 23.05.2020 ?
Also the steps where it says “soft link from python3.6 to python3.7”?
If so, run Seafile and Seahub in fastcgi mode to get detailed error messages.

Hi @axstet,
I see that the tutorial is especially for RasPi. I run seafile on a x86-64bit server with Debian 9 (stretch). In case of the softlink a python link is missing. There as just libs in the folder.

But maybe I have to edit the systemctl scripts?

To which python version does python3 point to?

Also Python 3.7.3.
So that’s why I don’t understand why seafile is still using 3.5…

Okay I also installed version 3.6.11 now and no change. I also created a symlink. The alias in the .bashrc file take no effect. When I type python3 --version it show me the alias version but when I input which python3 it relays to /usr/bin/python3 (Python 3.5) and not /usr/local/bin/python3.6 like in the alias.

2020-08-15T22:00:00Z: Edit + Solution:
So I installed Python 3.6 and 3.7 by hand. The quintessence in the service file seahub.service is first to add PATH in the environment like this Environment=PATH=/usr/local/bin/python3.6:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin . Second is to make a symlink to the Python installation with ln -s python3.6 python3 in /usr/local/bin/. If you use 3.7 just change the number. But it’s also necessary to add the alias in the .bashrc.