Internal Server Error 7.1.3

Same error here with Ubuntu 16.04.12 LTS after upgrading from 7.0.5 to 7.1.3

Same error, with DEBIAN 9.5 after upgrading from 7.0.5 to 7.1.3

I`ve update to pyhton 3.7.3 and the problem has solved
But now i have another.
when i create a folder to share (donwload) with password and time gave me this error

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

[ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /d/66bcbaaab23d4f62bdf8/#012Traceback (most recent call last):#012 File “xxxxxxxxxxxxxxx/seafileseafile-server-7.1.3/seahub/thirdpart/django/core/handlers/”, line 41, in inner#012 response = get_response(request)#012 File “xxxxxxxxxxxxxxx/seafileseafile-server-7.1.3/seahub/thirdpart/django/core/handlers/”, line 249, in _legacy_get_response#012 response = self._get_response(request)#012 File xxxxxxxxxxxxxxx/seafile/seafile-server-7.1.3/seahub/thirdpart/django/core/handlers/", line 187, in _get_response#012 response = self.process_exception_by_middleware(e, request)#012 File “xxxxxxxxxxxxxxx/seafile/seafile-server-7.1.3/seahub/thirdpart/django/core/handlers/”, line 185, in _get_response#012 response = wrapped_callback(request, *callback_args, **callback_kwargs)#012 File “/xxxxxxxxxxxxxxx/seafile/seafile-server-7.1.3/seahub/seahub/share/”, line 21, in _decorated#012 return func(request, fileshare, *args, **kwargs)#012 File “xxxxxxxxxxxxxxx/seafile/seafile-server-7.1.3/seahub/seahub/share/”, line 67, in _decorated#012 return func(request, *args, **kwargs)#012 File “/xxxxxxxxxxxxxxx/seafile-server-7.1.3/seahub/seahub/views/”, line 265, in view_shared_dir#012 if req_path[-1] != ‘/’:#012IndexError: string index out of range

this error only happen wiht password active in download link
upload link works with/out password
and download link wihtout password also works ok

It sounds like Seahub’s Github issue 4478 (can’t include links in my post).

yes is the same issue.
this only happens with password protected and download mode.
if you try without password it works and also with upload

Debian 9 here with Python 3.5 - same error like in my start post.

Ubuntu Server 16.04.6 LTS with Python 3.5 same problem.
Seemes like upgrading to 18.04 could fix the issue. I would probably try it.

Reverting back to 7.0.5 doesn’t solve a problem. :frowning:
I’ve got an Nginx error 502 Bad Gateway
In the log files there are tons of error messages
2020/03/30 12:09:46 [error] 371#371: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 37.192.131.XXX, server:, request: “GET /seafhttp/repo/9e3a5a24-2978-41ef-9f79-547607465ee4/commit/HEAD HTTP/1.1”, upstream: “”, host: “

Python 3.6 or 3.7 is required.

That is the Problem, Debian 9 have only 3.5…

I’ve compiled python 3.7.7 and now following error appears:

2020-03-31 03:08:55,430 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /favicon.ico
Traceback (most recent call last):
File “/seafile/seafile-server-7.1.3/seahub/thirdpart/django/core/handlers/”, line 41, in inner
response = get_response(request)
File “/seafile/seafile-server-7.1.3/seahub/thirdpart/django/core/handlers/”, line 244, in _legacy_get_response
response = middleware_method(request)
File “/seafile/seafile-server-7.1.3/seahub/seahub/base/”, line 68, in process_request
cur_note = cache.get(‘CUR_TOPINFO’) if cache.get(‘CUR_TOPINFO’) else
File “/seafile/seafile-server-7.1.3/seahub/thirdpart/django/core/cache/backends/”, line 40, in get
if not self._is_expired(f):
File “/seafile/seafile-server-7.1.3/seahub/thirdpart/django/core/cache/backends/”, line 137, in _is_expired
exp = pickle.load(f)
ValueError: unsupported pickle protocol: 5

Probably install and upgrade scripts should check whether OS is not supported.
It shouldn’t be hard to implement.
Also I’ve checked documentation before upgrading to 7.1.3 and it obviously says Ubuntu 16.04 is supported. I’ve broken my installation with the last update. Reverting to 7.0.5 doesn’t work now either. :frowning:
It’s my fault also as I didn’t have enough free space to create VM image backup, but it’s documentation that leaded me to an error. :frowning:

We have had the same problem after upgrading from 7.0.5.

The exception is caused by the programming in seahub/views/, method view_shared_dir:

def view_shared_dir(request, fileshare):

    token = fileshare.token

    password_check_passed, err_msg = check_share_link_common(request, fileshare)
    if not password_check_passed:
        d = {'token': token, 'view_name': 'view_shared_dir', 'err_msg': err_msg}
        return render(request, 'share_access_validation.html', d)

    username = fileshare.username
    repo_id = fileshare.repo_id

    # Get path from frontend, use '/' if missing, and construct request path
    # with fileshare.path to real path, used to fetch dirents by RPC.
    req_path = request.GET.get('p', '/')
    if req_path[-1] != '/':  
        req_path += '/'

If a password is required, the data for the html template contains no path field, so
req_path is an empty string and req_path[-1] crashes.


  1. delete the path form variable from the template
  2. check req_path for an empty string, i.e.
# Get path from frontend, use '/' if missing, and construct request path  
# with fileshare.path to real path, used to fetch dirents by RPC.
req_path = request.GET.get('p', '/')
if req_path=="" or req_path[-1] != '/':
    req_path += '/'

i’ve try 7.1.3 with self compilated 3.7.3, 3.7.7, 3.8.2 python but not work. giving up…

i’ve downgraded to 7.0.5, but in webinterface avatars not working, in admin webinterface avatar works fine…

hi, this works perfect, thanks

I’ve upgraded Ubuntu to 18.04 with do-release-upgrade
Then installed required packages from manual
apt-get install python3 python3-setuptools python3-pip python3-ldap -y

Installing required python packages failed firstly. In my case upgrading setuptools fixed the problem.
pip install --upgrade setuptools

Then I’ve installed required packages and started Seahub.
pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy psd-tools

Thanks for the solution, works perfectly.

UPDATE: Sorry, doesn’t but I have to correct myself. The fix provided below does NOT help the problem I reported.

The solution provided by powUpYM seems to fix this issue as well:

@daniel.pan will this be fixed in the next release? Quiet a breaker, so it’s still beta I guess. Please don’t make software as stable if it’s not.

1 Like

We have planned to release a new version in this week already.

The problem was discovered after we marked the previous release as beta for 2 months, making software as stable did make sense at that time.

1 Like