Ubuntu Upgrade to 20.04 broke Seahub (ARM)

After today’s upgrade from 18.04 to 20.04, I’m no longer able to start seahub with CE 7.1.4. On 18.04 it worked. I made sure to install all python dependencies and packages mentioned in the upgrade guide after the upgrade to 20.04, yet, something seems to be wrong/missing.

To get a log, I used start-fastcgi:

seafile-server-latest/seahub.sh start-fastcgi

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub (fastcgi) at …
Traceback (most recent call last):
File “… /seafile-server-7.1.4/seahub/seahub/avatar/models.py”, line 23, in
from PIL import Image
File “… /seafile-server-7.1.4/seahub/thirdpart/PIL/Image.py”, line 93, in
from . import _imaging as core
ImportError: cannot import name ‘_imaging’ from ‘PIL’ (… /seafile-server-7.1.4/seahub/thirdpart/PIL/init.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “… /seafile-server-7.1.4/seahub/manage.py”, line 10, in
File “… /seafile-server-7.1.4/seahub/thirdpart/django/core/management/init.py”, line 364, in execute_from_command_line
File “… /seafile-server-7.1.4/seahub/thirdpart/django/core/management/init.py”, line 338, in execute
File “… e/seafile-server-7.1.4/seahub/thirdpart/django/init.py”, line 27, in setup
File “… /seafile-server-7.1.4/seahub/thirdpart/django/apps/registry.py”, line 108, in populate
File “… /seafile-server-7.1.4/seahub/thirdpart/django/apps/config.py”, line 202, in import_models
self.models_module = import_module(models_module_name)
File “/usr/lib/python3.8/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 671, in _load_unlocked
File “”, line 783, in exec_module
File “”, line 219, in _call_with_frames_removed
File “… /seafile-server-7.1.4/seahub/seahub/avatar/models.py”, line 26, in
import Image
ModuleNotFoundError: No module named ‘Image’
Error:Seahub failed to start.

Using python, I can from PIL import Image or from PIL import _imaging without problem, so I’m guessing there is some problem with the bundled PIL.

Does anyone have an idea how to fix this or do I have to go back to 18.04?

Any help is greatly appreciated :slight_smile:

Since I was able to use the python PIL, I tried forcing seahub to use that version by renaming PIL inside seahub/thirdpart/.
This gave a new import issue with Crypto, installing PyCryptodome and renaming Crypto in seahub/thirdpart/ fixed that as well (hopefully). So far the server is running smoothly and I hope I haven’t fundamentally broken anything. :wink:
My (naive) understanding is that the thirdpart-modules are just bundled but not really necessary (and there shouldn’t be anything changed compared to the “original” modules). If that’s not the case, please let me know.