Issue upgrading an old Seafile Server

Hi all !

I’m trying to update an old 5.0.4 server to the last version, which in this moment is 7.1.5, if I’m not wrong.

When I try to run ./upgrade_5.0_to_5.1.sh, it just fails pointing to a “Syntax error”:

root@myhostname: .../seafile-server-latest/upgrade# ./upgrade_5.0_5.1.sh

-------------------------------------------------------------
This script would upgrade your seafile server from 5.0 to 5.1
Press [ENTER] to contiune
-------------------------------------------------------------



Updating seafile/seahub database ...

Traceback (most recent call last):
  File "/.../seafile-server-7.1.5/upgrade/db_update_helper.py", line 10, in <module>
    import pymysql
  File "/.../seafile-server-7.1.5/seahub/thirdpart/pymysql/__init__.py", line 96, in <module>
    from . import connections as _orig_conn
  File "/.../seafile-server-7.1.5/seahub/thirdpart/pymysql/connections.py", line 17, in <module>
    from . import _auth
  File "/.../seafile-server-7.1.5/seahub/thirdpart/pymysql/_auth.py", line 10, in <module>
    from cryptography.hazmat.backends import default_backend
  File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/backends/__init__.py", line 7, in <module>
    import pkg_resources
  File "/.../seafile-server-7.1.5/seahub/thirdpart/pkg_resources/__init__.py", line 1380
    raise SyntaxError(e) from e
                            ^
SyntaxError: invalid syntax

Failed to upgrade your database

I’m not sure how to tackle this issue, could you shed some light ?

Hi titoshadow,

welcome to the Seafile Community Forum!

Have you tried with an earlier release of Seafile?

Why don’t you try this one: https://download.seadrive.org/seafile-server_6.3.1_x86-64.tar.gz

Hey !

Wonderful, that worked out !

Double checked that the error I found in 7.1.5 folder upgrade scripts happens for all of them.

Now my issue is Seahub failed to start after upgrading straight to 6.2 + executing SQL manually to upgrade to 6.3 :\

Where can I find what’s wrong ?

Okey, seems like “pip install captcha” solved it :slight_smile:

I hope to be able to update to 7.1.5 without this hassle >.<

Could you give me a fixed version (regarding the upgrade scripts) of 7.1.5 release ?

I have already used the update script of 7.1.5 to run updates. I doubt it is the script.

Keep in mind: Seafile 7.1 requires Python 3.5 or 3.6. (Seafile 7.0 and earlier use Python 2.) Have you installed Python 3 on your server? Also: you never mentioned your OS. Make sure the OS has good Python 3 support. Because I am most familiar with ubuntu, I throw in this: Python 3 under 16.04 is difficult, it is smooth under 18.04

That is the issue, without doubt, since I am on Ubuntu 16.04

Anyway, will update today, then will update again :smiley:

Okey… Had to swim through some oldie threads because had issues like the one you fix with:
(troubles with ‘captcha.fields’ or ‘CaptchaField’)

pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy psd-tools django-pylibmc django-simple-captcha python3-ldap

After this had to double check gunicorn.conf because it switched from listening on 0.0.0.0:8000 to 127.0.0.1:8000, so I had to change it back because I use no reverse proxy, and voilà !

Finally got Seafile Server 7.1.5 working :slight_smile:

1 Like

:+1: :+1: