Closed tanhoaian01 closed 1 month ago
Looking at the files in the Google Drive, all of them are utf-8 except for the Ransom of the Red Chief, which is ISO-8859. I was able to generate a readability report for all of the other files. Once I downloaded the Red Chief file, I wasn't able to view it as a text file or import it into Pages. I also didn't find a way to read it with python.
So I think the fix here is to get your files into utf-8, which will mean that AnkiMorphs can read the file, and you'll also be able to open it with a normal editor.
Looking online, it looks like Notepad++ may have an option to "Save As..." and choose "Unicode" under "Encoding". If that doesn't work, I made a copy of that file in my Google Drive, Right-click, and Open with Google Docs. Then File... Download... Plain Text (txt). I was able to view that .txt file, and AnkiMorphs was able to read it and generate the readability report.
Thank you for help! Making a copy, opening with Google Docs and downloading as plain text fixes the issue for me. Your addon makes learning Chinese much more insteresting. Keep up the great work!
Nice catch @xofm31, the generator assumes utf-8 encoding: https://github.com/mortii/anki-morphs/blob/ff8c10532beb39c07f41c8fb037f712e8c308917/ankimorphs/generators_window.py#L362
I'll add a warning about this in the guide. Thanks for the feedback @tanhoaian01!
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Describe the bug
Hello, I am trying to create frequency lists from my Mandarin Companion graded reader but it appears that some of my txt files has corrupted Anki. I notice that such files are originally epub that I downloaded online and converted to txt via Calibre and did final formatting in Notepad+++. The non-error ones share the same workflow but they are initially pdf. I open them in default Notepad and they look just fine, no idea what causes them to break ankimorph. Can you please take a look and direct me on the solution? Thanks in advanced.
Steps to reproduce the behavior
Expected behavior
Able to generate readability report, frequency list and study plan from all of txt files.
Screenshots
Debug info
My setup