Zotero was unable to load translators and styles.
I suddenly had the error "Zotero was unable to load translators and styles." when starting Zotero.
I already tried the suggested actions:
- resetting translators and styles and checking your database integrity in the preferences.
- deleting the translators and styles folders in the data directory.
I work on Linux (Manjaro/Arch) and also use zotero from with a virtual machine running Windows 10.
The report ID is: 2036159652
Any advices, what to do?
Many thanks,
Samuel
I already tried the suggested actions:
- resetting translators and styles and checking your database integrity in the preferences.
- deleting the translators and styles folders in the data directory.
I work on Linux (Manjaro/Arch) and also use zotero from with a virtual machine running Windows 10.
The report ID is: 2036159652
Any advices, what to do?
Many thanks,
Samuel
You can try repairing it with the DB Repair Tool.
(As Word is still the main format in my environment, I still haven't found any alternative to use zotero in word besides in a virtual machine. It works all fine, as a long as I never open zotero twice. This time I forgot to close it. I guess this was the reason for the damage)
Unfortunately, the Repair Tool and the manual way was not successful. The created .sqlite file with the manual was of size 0KB.
An integrity check with
sqlite3 zotero.sqlite "PRAGMA integrity_check"
returned
*** in database main ***
On tree page 63852 cell 65: 2nd reference to page 31547
Page 43330 is never used
Error: database disk image is malformed
However, I finally managed by replacing the last line of the dump.sql by "COMMIT;", and then creating the new zotero.sqlite from the dump. Found on stackoverflow:
https://stackoverflow.com/questions/44602759/sqlite3-recreates-empty-database-from-dump-file
For the record, I did:
# integrity check on corrupted database
sqlite3 zotero.sqlite "PRAGMA integrity_check"
# rename
mv zotero.sqlite zotero.sqlite.old
# dump
sqlite3 zotero.sqlite.old .dump > dump.sql
# remove last line (could also be done in editor, but file is rather big)
head dump.sql -n -1 > dump1.sql
# add COMMIT; to end
echo 'COMMIT;' >> dump1.sql
# create database newly from dump
sqlite3 zotero.sqlite < dump1.sql
# integrity check on new database
sqlite3 zotero.sqlite "PRAGMA integrity_check"
# should return "ok"
Probably you want to implement this in the repair tool...
(One improvement we could consider would be first rebuilding an empty database from the current DB schema and then adding just the data from the corrupted database, but that could get into problems with the schema version. Really, when a naive dump and restore doesn't work, restoring from a backup and/or syncing is almost always going to be the better option.)