apkg-to-csv
apkg-to-csv copied to clipboard
Problem with converting
Hello community,
I am new to the whole github thing. I try to use the programm as discribed, but it wont work... I am not able to read such cryptic code :(... I will attach a picture to this problem so that you see what i mean. I would love some help! Thank you!
Hi Hubber1998,
The issue is that the program isn't able to read 1.apkg ("database disk image is malformed"). The rest of the error message can be ignored. You can try re-exporting the deck and running the program again.
If that still doesn't work, you'll have to either provide replication instructions or upload the deck so I can download it. Unfortunately, this isn't something I can debug without having the actual file.
Hey zfletch,
thank you for the quick respond. I will attach a link to file.io where you can download my studying cards. I need them in .csv. If you manage to do this, i would like to send you a little bonus on paypal. Would love to hear from you.
https://file.io/jQ7DNAAqFuRs
Yours, Hubber
In the archive you uploaded, there are 44 decks. Could you be more specific about the one causing you problems? I don't see any deck titled 1.apkg, which is in your initial screenshot.
I was not able to replicate the issue with the decks I tested. For example, when I run the command apkg-to-csv 'Fertigungstechnik Allgemein.apkg', it appears to work on my machine.
Thank you for your engagement. Yeah sorry... of course i can. It was the deck called "(A) Werkstoffkunde Kap1_ Aufbau kristalliner Stoffe" which i named "1" because the programm had trouble with this name. i think putting the name in these : "Name", solves this problem. But it doesent matter which deck i take... it gives me constantly the SQLITE3 error. I tried it with the one you chose but it failed again...
I hope you can follow... :)
I'm able to successfully convert it to a CSV on my machine. Here is the result.
It looks like this is a Windows issue. I don't use Windows nor do I have access to a Windows machine. Unfortunately there's not much more I can do. I have a few ideas about things that could work, but I can't verify them without being on Windows myself.
Technical details: I see some references to binmode when I search for similar issues, so my first idea is to set that for the temporary file being created. If you (or anyone who comes across this thread) would like to test my potential solution on Windows, it's available at this branch: https://github.com/zfletch/apkg-to-csv/tree/tempfile-binmode
Tested on Windows. Gets past the initial error but crashes at the end as it fails to delete the tempfile. Works by closing the db with db.close() at the end of the bin file.
Thank you for testing this, @aslaksm! I've updated the branch with your suggestion: https://github.com/zfletch/apkg-to-csv/commit/dbb0daba8a55af3557838e3509ac2429df40e739
Would you be able to test it to verify that it works? I will merge the branch and push a new release if it does.