No module named seafevents after Upgrade from Seafile-rpi 6.3.4 to 7.0.4

Hi,

after upgrade to 7.0.4 on my raspberry 3 B, i can not start seahub.
I get the following error message in the seahub.log:

[ERROR] root:68 <module> Failed to import seafevents package.
Traceback (most recent call last):
  File "/srv/seafile/seafile-server-7.0.4/seahub/seahub/utils/__init__.py", line 65, in <module>
    from seafevents import seafevents_api
ImportError: No module named seafevents

[ERROR] root:565 <module> Failed to import seafevents package.
Traceback (most recent call last):
  File "/srv/seafile/seafile-server-7.0.4/seahub/seahub/utils/__init__.py", line 561, in <module>
    import seafevents
ImportError: No module named seafevents

Does someone know how to resolve this problem? (It’s CE Version)

When i start successfully seafile (without the seafevents.conf file) then i get this Message:
** Message: seafile-controller.c(718): No seafevents.

This post doesn’t work for me: CentOS 7.4 - Seafile CE 7.0.0 - Seahub fails to start with Python error

Is redis neccessary for CE edition?

I already did “pip install certifi idna”.

Thank you very much!

Seafevents is only for PRO. In CE this file should not exist.
Check the seafile directory rights and ensure that seafile user is being used.

No

Thank you for your fast reply and help.

I dont know why, but in the conf folder there exists a seafevents.conf (i renamed it now).
My directory rights are all okay. The command “chown -Rc seafileuser:seafileuser /seafiledir” shows nothing.

I get still the same error message in seahub.log if i try to start seahub (with the seafileuser and with renamed seafevents.conf).
Seahub is not starting and the frontpage shows only a “502 Bad Gateway”.
Is there any other way to find the cause of issue? Or an other Logfile to check?

Shoud i do more than just start the upgrade script (upgrade/upgrade_6.3_7.0.sh) to use version 7.0.4 ?

With a new downloaded source directory, i can start seahub. I do not start the upgrade script again. But after login to the frontpage i can only see a blank white page (with all my browsers and cleared cache). The Sourcecode seems okay. But there are many TypeErrors at [/media/assets/frontend/…] from window.app.

Can i use the upgrade script again with a new downloaded source directory, or does it cause damage?

Thank you!

Yes, you can do try it. If the database
has already the tables, you will get an normal error and you should then execute the minor upgrade script.
I think that you mixed up something, then seafevents.conf should not be in the rpi version.

If Seahub doesn’t start, check in the forum for “gunicorn.conf” and “False” to increase verbosity of seahub.

Again thank you very much!
I allways used the rpi CE version since release 5.1.2

With deamon = False in gunicorn.conf i found a wrong MIDDLEWARE CLASS for fail2ban.
Now seahub is starting, but i can see only a blank white page after login.

My browser shows me also a SyntaxError: '' string literal contains an unescaped line break in my curNoteMsg (the frontend message from admin for users).
How can i delete the curNoteMsg?
But I don’t think that’s the reason for the problem.

I don’t have any more ideas.
It is save to go in the old 6.3.4 folder and start the minor-upgrade.sh script to rollback to the previous version?

No issues. You can check the bind address in gunicorn.conf. Again, check in the forum or in rpi-seafile github, where it is indicated.

@TT-SWP13 I found it: Seafile 7 only listens to 127.0.0.1

Yes, this is the way.

I haven’t downgraded yet. It’s the same behaviour if i change the bind-address in gunicorn.conf.
There are no errors in the log files. The webpage works (passwort reset works), but if i log in with my user i see only a white page.

I’m still looking for the cause until I downgrade the version.

Should i change the entry of nginx “proxy_pass http://127.0.0.1:8000;
also in the section of location / { ?

After downgrading to 6.3.4 the server works.

I try an other upgrade to 7.0.4 but the upgrade script show me this:

Updating seafile/seahub database ...
    [INFO] You are using SQLite3
    [INFO] updating seafile database...
    Traceback (most recent call last):
      File "/seafile/seafile-server-7.0.4/upgrade/db_update_helper.py", line 384, in <module>
        main()
      File "/seafile/seafile-server-7.0.4/upgrade/db_update_helper.py", line 379, in main
        db_updater.update_db()
      File "/seafile/seafile-server-7.0.4/upgrade/db_update_helper.py", line 275, in update_db
        super(SQLiteDBUpdater, self).update_db()
      File "/seafile/seafile-server-7.0.4/upgrade/db_update_helper.py", line 125, in update_db
        self.update_seafile_sql(seafile_sql)
      File "/seafile/seafile-server-7.0.4/upgrade/db_update_helper.py", line 296, in update_seafile_sql
        self.apply_sqls(self.seafile_db, sql_path)
      File "/seafile/seafile-server-7.0.4/upgrade/db_update_helper.py", line 289, in apply_sqls
        conn.execute(line)
    sqlite3.OperationalError: duplicate column name: status

    Failed to upgrade your database

Do I have to change the database manually and delete the entries (duplicates) for an other upgrade?

No, the (database) upgrade was properly done. Now, you should run the minor upgrade to migrate avatars and create symlink.

1 Like

It was the SyntaxError in curNoteMsg. Now the server works with version 7.0.4 after deleting this message.

Thank you very much!