Database Error
If you see a message like the one below, keep the error details and stop editing. Avoid repeatedly retrying synchronization or restoration.

What happened?
A database error does not necessarily mean your documents are corrupted. It may indicate insufficient disk space, missing write permissions, a disconnected external disk, or files in use by another program. Keeping an active Library in a third-party cloud drive's sync folder can also cause corruption through file conflicts.
First distinguish between these situations:
- Incompatible database version: follow Incompatible Database Version. Do not delete the database.
- Library data missing: check whether the folder was moved or renamed, or its disk disconnected. Current versions show “Library Data Not Found” if a previously opened Library is missing its data file. If you find the original folder, use the prompt to relocate it.
- Permission, disk or file-in-use errors: restore folder access, free disk space or close the program using the files, then try opening the Library again.
- Database corruption, or errors that persist after those checks: preserve the original Library and check your backups as described below.
How to handle it?
1️⃣ Exit and restart WonderPen
Exit WonderPen. Confirm that the Library's disk is accessible and has enough free space, then reopen it. Restarting can resolve some temporary file-in-use problems.
If the error persists, exit again and copy the entire original Library folder to another location, including its backups, Assets and any data.db-wal or data.db-shm files. Do not keep only data.db or delete these files first. If disk or permission problems prevent copying, resolve the access problem or contact us.
2️⃣ Restore from backup
If the Library still opens, use Backup and Restore to preview the backup records and find a complete version. The newest backup may not be the version you need; check its date and content.

Restoring overwrites data in the target Library. We recommend verifying the backup in a new Local Library first. If you restore to the original Library, preserve a copy as described above before proceeding. See Backup and Restore.
3️⃣ Verify the backup in a new Library
If the original Library cannot open, restoration fails, or you want to check the backup first, restore it into another Local Library:
Locate an existing backup Zip file.
Check the original Library's
backupfolder or your configured extra backup locations. Copy the files you need to a safe location first. Do not extract or modify their contents.Start WonderPen and create a Local Library in another location.
In the new Library, click its name and select Restore Library from a Zip file, then import the backup.
Check the restored chapters, document content, memos, whiteboards and Assets.
If it is not the version you need, try another backup in this new Library. Once you have confirmed the content is complete, decide whether to keep using the new Library or migrate it. Keep the original copy and backup files until you are sure you no longer need them.
WARNING
Do not delete data.db to force an empty Library to open. If you see “Library Data Not Found”, first locate the original folder or a usable backup. Creating an empty Library at the original location will not recover missing content. If no backup is available, preserve the original files and contact us.
Still having problems?
Please contact us with the error message, WonderPen version, operating system, whether the Library is local or cloud, and what happened before the problem started.
More information
Common codes can help identify what to check, but a code alone does not establish whether documents are damaged:
| Error Code | Check First |
|---|---|
SQLITE_BUSY / SQLITE_LOCKED | Other operations or programs using the database; close them and restart |
SQLITE_PERM / SQLITE_READONLY | Write access to the Library folder and its disk |
SQLITE_FULL | Available disk space |
SQLITE_CANTOPEN | The path, folder permissions and disk connection |
SQLITE_IOERR | Disk connection, access permissions or storage device problems |
SQLITE_CORRUPT / SQLITE_NOTADB | Possible corruption or an invalid database file; preserve the files and check backups |
SQLITE_NOMEM | Available system memory |
SQLITE_TOOBIG | Data too large for the operation; keep the error details and contact us |
For complete error-code definitions, see the official SQLite documentation.
