can't open library

Hi,
I have a separate Zotero library for a work project and access it by using the following in terminal /Applications/Zotero.app/Contents/MacOS/zotero -P

Something has happened and now the library won't open. I get the following error message:
Error: Error(s) encountered during statement execution: database disk image is malformed [QUERY: SELECT version FROM version WHERE schema='lastsync'] [PARAMS: ] [ERROR: database disk image is malformed]
Zotero.DBConnection.prototype.valueQueryAsync@chrome://zotero/content/xpcom/db.js:731:13
From previous event:
ZoteroService@file:///Applications/Zotero.app/Contents/Resources/components/zotero-service.js:346:7
@chrome://zotero/content/include.js:4:14

Any suggestions?
Sarah
  • I should add, I can see all the items in my personal Zotero library, as it is also a group library.
  • database disk image is malformed
    The database is corrupted. Are you storing this on a cloud storage folder or external disk?

    You can try one of the zotero.sqlite backups in the Zotero data directory or try running the database through the DB Repair Tool.
  • thanks will give those a go. The database is on my laptop. Since I last used it, it has been accessed via an API key to create a web interface using this https://github.com/whiskyechobravo/kerko - that wouldn't have caused issues would it, or is it a local problem?
  • edited December 8, 2022
    No, an API key would be for connecting to the online library, and that wouldn't have any effect on the integrity of the local database file.
    The database is on my laptop.
    Well, a cloud storage folder is also on your laptop. What matters is that it's a regular folder that's not managed by any other sync process.
  • the database repair tool fixed it! Phew! Thanks so much :)
Sign In or Register to comment.