Dev build (2.5) MySQL error during boot, some tables created but not all

Bug #1844044 reported by Dave Bevan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
New
Undecided
Unassigned

Bug Description

OpenLP 2.5 dev2902

Ubuntu 18.04.3 LTS

Configured for MySQL (happens to be MariaDB 10.1.41-MariaDB-0ubuntu0.18.4.1)

Debug log: (full is attached)

MySQL tables after the error:

MariaDB [openlp]> show tables;
+------------------+
| Tables_in_openlp |
+------------------+
| authors |
| metadata |
| song_books |
| songs |
| topics |
+------------------+
5 rows in set (0.00 sec)

Revision history for this message
Dave Bevan (dave-bevan) wrote :
Revision history for this message
Tomas Groth (tomasgroth) wrote :

Looking at the logs, this seems to be the issue:

sqlalchemy.exc.CompileError: (in table 'media_files', column 'file_path'): VARCHAR requires a length on dialect mysql

We should probably also test is postgresql works.

Revision history for this message
Tomas Groth (tomasgroth) wrote :

Hi Dave

Could you try to apply the attached patch and report if it helps? You should probably clear the database for the created tables first.

Revision history for this message
Dave Bevan (dave-bevan) wrote :

Hi Tomas.

Patch applied. Different error now. Latest log attached.

Revision history for this message
Dave Bevan (dave-bevan) wrote :

I should have added:

MariaDB [openlp]> show tables;
+------------------+
| Tables_in_openlp |
+------------------+
| authors |
| media_files |
| metadata |
| song_books |
| songs |
| topics |
+------------------+
6 rows in set (0.00 sec)

Revision history for this message
Dave Bevan (dave-bevan) wrote :

And also, there's a Database Error dialog box appearing during launch:

OpenLP cannot load your database.

Database: sqlite:////home/bevand10/.local/share/openlp/songs/songs.sqlite

This is despite it knowing it's in MySQL mode.

Revision history for this message
Dave Bevan (dave-bevan) wrote :

And subsequently, I re-ran the 1st-time wizard, with MySQL mode still enabled of course. I selected all plugins for enablement.

Caused the following error:

Traceback (most recent call last):
  File "/home/bevand10/Documents/fbc/git/digial-music-stand/OpenLP-2.5.dev2902/openlp/core/ui/mainwindow.py", line 700, in on_first_time_wizard_clicked
    self.first_time()
  File "/home/bevand10/Documents/fbc/git/digial-music-stand/OpenLP-2.5.dev2902/openlp/core/common/mixins.py", line 69, in wrapped
    raise e
  File "/home/bevand10/Documents/fbc/git/digial-music-stand/OpenLP-2.5.dev2902/openlp/core/common/mixins.py", line 64, in wrapped
    return func(*args)
  File "/home/bevand10/Documents/fbc/git/digial-music-stand/OpenLP-2.5.dev2902/openlp/core/ui/mainwindow.py", line 672, in first_time
    plugin.first_time()
  File "/home/bevand10/Documents/fbc/git/digial-music-stand/OpenLP-2.5.dev2902/openlp/plugins/songs/songsplugin.py", line 373, in first_time
    self.on_tools_reindex_item_triggered()
  File "/home/bevand10/Documents/fbc/git/digial-music-stand/OpenLP-2.5.dev2902/openlp/plugins/songs/songsplugin.py", line 257, in on_tools_reindex_item_triggered
    max_songs = self.manager.get_object_count(Song)
  File "/home/bevand10/Documents/fbc/git/digial-music-stand/OpenLP-2.5.dev2902/openlp/core/lib/db.py", line 519, in get_object_count
    query = self.session.query(object_class)
AttributeError: 'NoneType' object has no attribute 'query'

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.