Closed jpaulogg closed 1 month ago
This seems that you compiled sioyek and copied the executable to /usr/bin
. This will not work because sioyek expects some files next to the executable. You should create a new build directory and copy the sioyek executable, shaders
folder and keys.config
and prefs.config
files from the pdf_viewer
dir to the build directory.
I copied the executable to /usr/bin
, the shaders
folder to /usr/share/sioyek
, and the configuration files to /etc/sioyek
, as described in the sioyek(1) manual.
I also uncommented #define LINUX_STANDARD_PATHS
in main.cpp, and now the paths seem correct. However, I am still experiencing issues with the database files.
Can you share your old and new local.db
and shared.db
? Maybe there is an issue there.
Here are the files. databases.zip
These are just the old database files, where are the migrated database files?
The script output:
$ database_migrator.py --old-shared-db backup/sioyek/shared.db --new-shared-db /home/jpgg/Downloads/shared.db
Migrating table opened_books
Traceback (most recent call last):
File "/home/jpgg/.local/bin/database_migrator.py", line 111, in <module>
migrate(old_conn, new_conn)
File "/home/jpgg/.local/bin/database_migrator.py", line 98, in migrate
migrate_table(old_conn, new_conn, table)
File "/home/jpgg/.local/bin/database_migrator.py", line 86, in migrate_table
cursor.execute(f"INSERT OR REPLACE INTO {table_name} ({columns}) VALUES ({values})")
sqlite3.OperationalError: near ")": syntax error
$ database_migrator.py --old-shared-db backup/sioyek/local.db --new-shared-db /home/jpgg/Downloads/local.db
Migrating table document_hash
Traceback (most recent call last):
File "/home/jpgg/.local/bin/database_migrator.py", line 111, in <module>
migrate(old_conn, new_conn)
File "/home/jpgg/.local/bin/database_migrator.py", line 98, in migrate
migrate_table(old_conn, new_conn, table)
File "/home/jpgg/.local/bin/database_migrator.py", line 86, in migrate_table
cursor.execute(f"INSERT OR REPLACE INTO {table_name} ({columns}) VALUES ({values})")
sqlite3.OperationalError: near ")": syntax error
$ database_migrator.py --old-shared-db backup/sioyek/test.db --new-shared-db /home/jpgg/Downloads/test.db
Migrating table opened_books
Migrated 0 rows from opened_books
Migrating table marks
Migrated 0 rows from marks
Migrating table bookmarks
Migrated 0 rows from bookmarks
Migrating table highlights
Migrated 0 rows from highlights
Migrating table links
Migrated 0 rows from links
Migrating table document_hash
Migrated 0 rows from document_hash
Have you followed the instructions here exactly? https://github.com/ahrm/sioyek/discussions/1156#discussioncomment-10614340 (specifically step 2, after deleting the old file you need to run the new version of sioyek once so that the new database files are created)
Note that the new shared.db file path should be one that is created by running the new sioyek version after moving the previous database files, not any arbitrary path.
Have you followed the instructions here exactly?
Now I did it, but this didn't resolve the problem either. Here are the new migrated_databases.zip files and the command output:
$ cd ~/.local/share
$ python ~/.local/bin/database_migrator.py --old-shared-db backup/sioyek/shared.db --new-shared-db sioyek/shared.db
Migrating table opened_books
Migrated 235 rows from opened_books
Migrating table marks
Migrated 126 rows from marks
Migrating table bookmarks
Migrated 5 rows from bookmarks
Migrating table highlights
Traceback (most recent call last):
File "/home/jpgg/.local/bin/database_migrator.py", line 111, in <module>
migrate(old_conn, new_conn)
File "/home/jpgg/.local/bin/database_migrator.py", line 98, in migrate
migrate_table(old_conn, new_conn, table)
File "/home/jpgg/.local/bin/database_migrator.py", line 86, in migrate_table
cursor.execute(f"INSERT OR REPLACE INTO {table_name} ({columns}) VALUES ({values})")
sqlite3.OperationalError: near "ser": syntax error
The shared.db
schema is still wrong. Wait I was assuming that you are trying to build the development branch of sioyek. Are you building the main branch?
Yes, I was building the main branch. I am now trying to build the development branch, but I am encountering dependency issues. The latest error message is:
make: *** [Makefile:1696: TouchSettings.o] Error 1.
This error doesn't tell me anything. Note that the development branch requires qt 6.7+.
I'm having trouble compiling, so I'll try again later. Thanks for your help, and sorry for the confusion!
I was able to build sioyek from the development branch (I had to symlink /usr/lib/qt6/bin/qmake-qt6
to /usr/bin/qmake-qt6
). After following the 3 steps, the output for step 3 was:
Migrating table opened_books
Migrated 235 rows from opened_books
Migrating table marks
Migrated 126 rows from marks
Migrating table bookmarks
Migrated 5 rows from bookmarks
Migrating table highlights
Traceback (most recent call last):
File "/home/jpgg/.local/bin/database_migrator.py", line 109, in <module>
migrate(old_conn, new_conn)
File "/home/jpgg/.local/bin/database_migrator.py", line 96, in migrate
migrate_table(old_conn, new_conn, table)
File "/home/jpgg/.local/bin/database_migrator.py", line 84, in migrate_table
cursor.execute(f"INSERT OR REPLACE INTO {table_name} ({columns}) VALUES ({values})")
sqlite3.OperationalError: near "ser": syntax error
So, I’m only running into issues with the highlights. Here are the new database migrated_databases.zip
After step 3, I replaced the new shared.db with the older one, and now it's working. So I'll close the github issue. Thanks for the help!
Running sioyek from the command line:
Before installation, when running Sioyek from the build directory, I can open documents, but it doesn't seem to load data from shared.db even though I used the script provided to convert older databases to the new release format. I also tried using the --shared-database-path option, but it didn't solve the issue. After installing as root, sioyek fails to render any PDFs. The same happened when I installed the Linux binary from the alpha release.
Version sioyek-2.0.0_10 from Void Linux's package manager works fine (but I want to upgrade because I can't delete highlights with this version).