Skeeve / PBibFix

A Pocketbook Application designed to fix entries in PocketBook's Library (Bibliothek) database
MIT License
2 stars 0 forks source link

Ambiguous column name: ext #3

Open uvok opened 9 months ago

uvok commented 9 months ago

Hi,

not sure if you're still maintaining this. I run the latest release package of this application on my Pockerbook HD 3 with firmware U632.6.7.1706.

When running this application I get an error dialog saying "While running a database query: ambiguous column name: ext". The debug log in the device storage also only lists this message (after listing the deleted books). I believe this is caused by the database query defined on line 19 in /src/pbibfix.go.

uvok commented 9 months ago

Further analysis: This seems to be because both books_impl and files table have a column named "ext".

It doesn't seem to matter which one you would choose.

SELECT name AS path, filename, B.id, firstauthor, series, numinseries, sort_title
FROM books_impl B
JOIN files F
ON B.id = F.book_id
JOIN folders P
ON P.id = F.folder_id
WHERE F.ext != B.ext;

lists no results for my library at least.

Skeeve commented 9 months ago

I will have to take a look, but I think it should be fixed when line 26 is changed to

WHERE B.ext = 'epub'
uvok commented 9 months ago

I would try to fix and build this myself, but I can't get the build environment running. dennwc/pocketbook-go-sdk:latest does not exist, and if I change the image to dennwc/pocketbook-go-sdk:v0.2 (latest available tag), and try to run docker-compose run make, I get

Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "go": executable file not found in $PATH: unknown
Skeeve commented 9 months ago

I haven't done anything with this for a long time. Will check as soon as I can. But I can't promise anything. Sorry.

Skeeve commented 9 months ago

In the meantime: Maybe this is more useful for you? https://git.rustysoft.de/martin/PbDbFixer

uvok commented 9 months ago

Thanks, the linked project worked for me as well.

Skeeve commented 9 months ago

Seems there is much more changed. I got it compiled and now I have:

+--------------------------------------------+
| (!) While removing entries from books_uids |
|     no such table: books_uids              |
+--------------------------------------------+
| 1) OK                                      |
+--------------------------------------------+

Have to invest more into it. Not sure whether it's worth it.

uvok commented 9 months ago

No worries if you decide not to fix it