Failed to update from 6.2.5 to version 7.1.3: "ImportError: No module named configparser"

Hello,

I’m trying to update my Seafile server on Ubuntu 16 from version “6.2.5” to version “7.1.3”. For this I downloaded the new server files, extracted, stopped the services. Then, following the community manual (not allowed to post link here), I tried to run “seafile-server-7.1.2/upgrade/upgrade_6.2_to_6.3.sh”. However I get this error:


Updating seafile/seahub database …

Traceback (most recent call last):
File “/home/seafile/seafileroot/seafile-server-7.1.3/upgrade/db_update_helper.py”, line 5, in
import configparser
ImportError: No module named configparser

Failed to upgrade your database


After some googling, this seems to be related to the version of python. The install script “upgrade_6.2_6.3.sh” probably selects Python 2.7, but the script “db_update_helper.py” is written for Python 3.

Am I doing something wrong here or is this an oversight in the new installation?

All help is appreciated. Thank you

1 Like

Same here

Got it working my updating following lines to the update script upgrade/upgrade_6.3_7.0.sh:

function check_python_executable() {
if [[ "$PYTHON" != "" && -x $PYTHON ]]; then
    return 0
fi


if which python3 2>/dev/null 1>&2; then
    PYTHON=python3
elif which python2.7 2>/dev/null 1>&2; then
    PYTHON=python2.7
elif which python27 2>/dev/null 1>&2; then
    PYTHON=python27
else
    echo
    echo "Can't find a python executable of version 2.7 or above in PATH"
    echo "Install python 2.7+ before continue."
    echo "Or if you installed it in a non-standard PATH, set the PYTHON enviroment varirable to it"
    echo
    exit 1
fi

which lets the script use python3 as default.
additionally, I had to remove the fileserver section in file /home/seaf/conf/seafile.conf.

1 Like

Check your config nginx or apache, from 6.00 to 7.1x we no longer use fast cgi … only WSGI

did you install pip3-python …

https://download.seafile.com/published/seafile-manual/upgrade/upgrade_notes_for_7.1.x.md