Seafile server 7.1.0 is ready for testing! Migrate to Python 3

@Jonathan: Thanks for your answer! I tried with a fresh server and fresh seafile installation on CentOS8 but still was not able to use seafdav!

First I got an error message about missing _sha1 module:

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

File “/opt/seafile/seafile-server-7.1.1/seahub/seahub/repo_api_tokens/models.py”, line 1, in
from _sha1 import sha1
ModuleNotFoundError: No module named ‘_sha1’

I fixed it by replacing first line of file “/opt/seafile/seafile-server-7.1.1/seahub/seahub/repo_api_tokens/models.py” “from _sha1 import sha1” with “import hashlib” as discussed here Failed to install hashlib, python 3, debian - Stack Overflow

Then I enabled webdav in conf/seafdav.conf and got same error message in log file logs/controller.log every 10 seconds:

[02/27/20 22:49:58] seafile-controller.c(412): pid file /opt/seafile/pids/seafdav.pid does not exist
[02/27/20 22:49:58] seafile-controller.c(444): seafdav need restart…
[02/27/20 22:49:58] seafile-controller.c(79): spawn_process: /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /opt/seafile/logs/seafdav.log --pid /opt/seafile/pids/seafdav.pid --port 8080 --host 0.0.0.0
[02/27/20 22:49:58] seafile-controller.c(94): spawned /usr/bin/python3, pid 3441

If I execute command in a shell by hand

/usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /opt/seafile/logs/seafdav.log --pid /opt/seafile/pids/seafdav.pid --port 8080 --host 0.0.0.0

I get error message

/usr/bin/python3: Error while finding module specification for ‘wsgidav.server.server_cli’ (ModuleNotFoundError: No module named ‘wsgidav’)

That’s why I tried to install module wsgidav by hand. (pip3 install wsgidav --user).
How can I install correct module wsgidav? Or why is module wsgidav shipped together with seafile (/opt/seafile/seafile-server-7.1.1/seahub/thirdpart/wsgidav) not found?

I realized that the upgrade from 7.0.13 to 7.1.0 beta Seafile Pro Ubuntu broke my share links, causing a screen on the browser stating there is a “server hiccup”. I updated from 7.1.0 to 7.1.1 with the same issue. I rolled back to 7.0.13 with the minor-upgrade.sh script and the share links once again work perfectly. The errors from seahub.log are below.

7.1.0 beta

2020-02-28 16:29:51,829 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /d/58f9552b2fa748af96d2/
Traceback (most recent call last):
  File "/media/wdblue/seafile/seafile-pro-server-7.1.0/seahub/thirdpart/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/media/wdblue/seafile/seafile-pro-server-7.1.0/seahub/thirdpart/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/media/wdblue/seafile/seafile-pro-server-7.1.0/seahub/thirdpart/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/media/wdblue/seafile/seafile-pro-server-7.1.0/seahub/thirdpart/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/media/wdblue/seafile/seafile-pro-server-7.1.0/seahub/seahub/share/decorators.py", line 21, in _decorated
    return func(request, fileshare, *args, **kwargs)
  File "/media/wdblue/seafile/seafile-pro-server-7.1.0/seahub/seahub/share/decorators.py", line 67, in _decorated
    return func(request, *args, **kwargs)
  File "/media/wdblue/seafile/seafile-pro-server-7.1.0/seahub/seahub/views/repo.py", line 255, in view_shared_dir
    if req_path[-1] != '/':
IndexError: string index out of range

7.1.1 beta

2020-02-28 16:40:25,260 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /d/3556bd2ba3aa49d6adf7/
Traceback (most recent call last):
  File "/media/wdblue/seafile/seafile-pro-server-7.1.1/seahub/thirdpart/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/media/wdblue/seafile/seafile-pro-server-7.1.1/seahub/thirdpart/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/media/wdblue/seafile/seafile-pro-server-7.1.1/seahub/thirdpart/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/media/wdblue/seafile/seafile-pro-server-7.1.1/seahub/thirdpart/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/media/wdblue/seafile/seafile-pro-server-7.1.1/seahub/seahub/share/decorators.py", line 21, in _decorated
    return func(request, fileshare, *args, **kwargs)
  File "/media/wdblue/seafile/seafile-pro-server-7.1.1/seahub/seahub/share/decorators.py", line 67, in _decorated
    return func(request, *args, **kwargs)
  File "/media/wdblue/seafile/seafile-pro-server-7.1.1/seahub/seahub/views/repo.py", line 265, in view_shared_dir
    if req_path[-1] != '/':
IndexError: string index out of range

Hi @k4zz

fastcgi mode is no longer supported. You should use ‘start’ command and change your Nginx configuration according to the latest documentation (use wsgi instead of fastcgi).

That’s because the path to the modules is not added to PYTHONPATH when you run it from command line. These path is set correctly when it’s started by our script.

And have you installed additional required python modules according to our upgrade notes: https://download.seafile.com/published/seafile-manual/upgrade/upgrade_notes_for_7.1.x.md ?

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

Hi @daniel.pan,
Is this info still up to date? If not, could you update your roadmap?

Thanks & BR,
Leo

We have just upgraded our release building system to use Docker images instead of using virtual machines. The new package 7.1.2 will be available tomorrow.

Thanks for the update!

how did you get this info box?

7.1.2 beta is out!

7.1.2 beta (2020/03/05)

  • [fix] Fix HTTP/2 support
  • Markdown page can now be printed using browser’s “Print…”
  • Add zoom buttons for PDF page
  • Add sort function for directory share link page
  • Support using JWT in OnlyOffice integration
  • UI improvements for pages in admin panel

:point_right: Support using JWT in OnlyOffice integration :star_struck:

5 Likes

About, in the lower left corner

image

7.1 is still beta for pro version are there any news on the release build ?

Work fine, thanks

image

This does not support multi-page markdown files, correct?

Not sure what this means. Can anyone help?

Hi @rdb sorry for misstundertanding since I’m not a Seafile Developer and therefore don’t know the answers though.

My intention with that post was just to “announce” in a quick & dirty way the new release, occasionally for other people like me – since I’m not checking everyday on the seafile download page for new releases…

No worries, I was not expecting an answer from you. I should have pointed out that this was a general question directed at the developer team.

Nice! Finally! :slight_smile:
@daniel.pan how can we enable JWT with onlyoffice? Are there any docs?
Cant find anything in the upgrade docs or onlyoffice deployment yet.

I’m a bit confused, how do you all start seafile? I try to start seafile via seafile-server-latest/bin/seafile-admin start but get an error, as this script hasn’t been ported to Python 3 yet:
SyntaxError: Missing parentheses in call to \'print\'. Did you mean print(\'Python 3 not supported yet. Quit now\'

Worth a note is that I’m building seafile-server from source, and the build and installation instructions (while being a bit confusing) still reference seafile-admin as the way to start seafile.

After building Seafile Server please checkout the https://seafile.readthedocs.io/en/latest/
It will guide you on how to setup the server.

Thanks. So obviously these instructions on seafile . com (I can’t include any links) are deprecated. I may open an issue about that.

You can find the document here for OnlyOffice JWT: https://download.seafile.com/published/seafile-manual/deploy/only_office.md#user-content-Configure%20OnlyOffice%20to%20use%20JWT%20Secret

1 Like

In 7.1.2 CE I can’t set a notification to “read”. Reproduce:
Share an upload link, upload a file -> you have one new notification. Click it, or click the (x) and it is read/gone. Reload the page and it is unread again
Somebody else having this issue? It’s really annoying