小白求教各位大神,升级报python 要怎么解决?


#1

[root@localhost seafile-server-7.1.5]# upgrade/upgrade_7.0_7.1.sh


This script would upgrade your seafile server from 7.0 to 7.1
Press [ENTER] to contiune

ln: failed to create symbolic link ‘/opt/seafile/seafile-data/data’: File exists
Created the symlink /opt/seafile/seafile-data for /data.

renaming the gunicorn.conf to gunicorn.conf.py …

Done

Updating seafile/seahub database …

Traceback (most recent call last):
File “/opt/seafile/seafile-server-7.1.5/upgrade/db_update_helper.py”, line 383, in
main()
File “/opt/seafile/seafile-server-7.1.5/upgrade/db_update_helper.py”, line 377, in main
db_updater = DBUpdater.get_instance(version)
File “/opt/seafile/seafile-server-7.1.5/upgrade/db_update_helper.py”, line 84, in get_instance
seafile_db_info = DBUpdater.get_seafile_mysql_info(version)
File “/opt/seafile/seafile-server-7.1.5/upgrade/db_update_helper.py”, line 183, in get_seafile_mysql_info
config = Utils.read_config(seafile_conf, defaults)
File “/opt/seafile/seafile-server-7.1.5/upgrade/db_update_helper.py”, line 60, in read_config
cp.read(config_path)
File “/usr/lib64/python3.6/configparser.py”, line 697, in read
self._read(fp, filename)
File “/usr/lib64/python3.6/configparser.py”, line 1015, in _read
for lineno, line in enumerate(fp, start=1):
File “/usr/lib64/python3.6/encodings/ascii.py”, line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe4 in position 76: ordinal not in range(128)

Failed to upgrade your database

[root@localhost seafile-server-7.1.5]#


#2

7.1版本之后需要 python3 支持,可以看一下官方部署说明,https://cloud.seafile.com/published/seafile-manual-cn/deploy/using_mysql.md

重点是按照你的服务器系统执行下面的操作:
Seafile 7.1.x 版本

on Debian 10/Ubuntu 18.04/Ubuntu 20.04

apt-get update

apt-get install python3 python3-setuptools python3-pip python3-ldap libmysqlclient-dev -y

pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.3.8 psd-tools \ django-pylibmc django-simple-captcha

on CentOS 8 (CentOS7应该也通用)

yum install python3 python3-setuptools python3-pip python3-ldap python3-devel gcc gcc-c++ -y

pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.3.8 psd-tools \ django-pylibmc django-simple-captcha