Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I'm getting a "Disk Image Is Malformed" error #352

Open
sebhrivas opened this issue Mar 28, 2024 · 8 comments
Open

I'm getting a "Disk Image Is Malformed" error #352

sebhrivas opened this issue Mar 28, 2024 · 8 comments

Comments

@sebhrivas
Copy link

Hi, I was trying to import my highlights to add new books I read since the last time I imported them but I am getting this error

Error: database disk image is malformed at f.handleError (plugin:obsidian-kobo-highlights-importer-plugin:599:19) at c.step (plugin:obsidian-kobo-highlights-importer-plugin:326:31) at Repository.parseContentStatement (plugin:obsidian-kobo-highlights-importer-plugin:17700:22) at Repository.eval (plugin:obsidian-kobo-highlights-importer-plugin:17659:29) at Generator.next (<anonymous>) at eval (plugin:obsidian-kobo-highlights-importer-plugin:54:61) at new Promise (<anonymous>) at __async (plugin:obsidian-kobo-highlights-importer-plugin:38:10) at Repository.getAllContentByBookTitleOrderedByContentId (plugin:obsidian-kobo-highlights-importer-plugin:17654:12) at HighlightService.eval (plugin:obsidian-kobo-highlights-importer-plugin:17491:40)

How can I fix it?

@OGKevin
Copy link
Owner

OGKevin commented Mar 29, 2024

On what version are you getting this?
Have you tried on other versions as well?

@sebhrivas
Copy link
Author

I'm running Obsidian 1.5.11 and the plugin is 2.0.0 — how could I try in other versions?

@OGKevin
Copy link
Owner

OGKevin commented Mar 30, 2024

go to the releases: https://github.com/OGKevin/obsidian-kobo-highlights-import/releases
find one, download the plugin zip and extract it in the folder below.

[Your Vault]/.obsidian/plugins/

specifically, the main.js needs to get replaced.

@sebhrivas
Copy link
Author

Thanks for the instructions. Just tried with v1.5.4 and the 1.6.0-beta.2 and I get the same error.

@OGKevin
Copy link
Owner

OGKevin commented Mar 31, 2024

Ah, I forgot to mention that you must restart obsidian after manually changing the plugin folder.

Next to this, can you try to open that database in a DB app like https://tableplus.com/ and see if that can actually open and read the DB?

If multiple versions is giving you trouble and another app can't open the DB, then it sounds more like a DB issue rather than an app issue. .e.g. corrupted DB or wrong file.
image

Also, what is your e-reader model?

@sebhrivas
Copy link
Author

Hi, first of all thanks for all your help so far, really appreciate it!
I did restart Obsidian every time I changed the plugin version + connected and disconnected the Kobo.
So, I couldn't figure out how to open the DB with tableplus but I searched for an online tool to open it and you can see it does open and it has the books + bookmarks there so it seems like the DB is not corrupt.
SCR-20240331-ksuo
My Kobo is a Clara HD and I always keep it updated.

@sebhrivas
Copy link
Author

@OGKevin Hi, any other suggestion on this?

@OGKevin
Copy link
Owner

OGKevin commented Apr 22, 2024

No not really 🤔 I can't seem to reproduce this issue.
And if you are the only one with this issue, I'm afraid it might be an issue on your end.

Did you try a different computer by any chance?
What if you create a copy of the database?
What if you manually create a new database, and then export the data out of the old one into the new one? Does that export button in your screen shot export to SQL statements that you can use to manually import.

This rules out at least if its a plugin issue or a DB issue.
E.g. if that manually created DB with data works, then its a DB issue.
Or it could be a data issue, maybe there is some weird characters/data in the DB?

Can you also try to manually execute the query that fails:

`select Title, ContentID, ChapterIDBookmarked, BookTitle from "content" where BookTitle = $bookTitle order by "ContentID"`,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants