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 ?
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
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à !