kaegi / MorphMan

Anki plugin that reorders language cards based on the words you know
Other
262 stars 66 forks source link

Recalc incompatibility while Windows 10 username includes special unicode character(?) #159

Open Dakkuimm opened 4 years ago

Dakkuimm commented 4 years ago

I was consistently getting errors while trying to recalc. I tried many different solutions but none of them were for my specific problem. I had my suspicions so I made an ENTIRELY NEW windows user and moved all of my files over. Sure enough, it worked and I was able to do my first recalculate. Here's my error, for the curious.

error.txt

Now, I wasn't able to find anybody with the same exact error as me, EXCEPT this issue thread where their error nearly mirrors mine: https://github.com/kaegi/MorphMan/issues/140

Notice how both logs respectively have three traceback exceptions in call, followed by the ones in onMorphManRecalc, then main, then mkALLDb, then getMorphemes, then getMorphemesFromExpr, etc.

ShakeItCherry's Windows user is João Comassetto, which includes a unicode character that isn't part of the Basic Latin Unicode block, similar to my Windows user, ダック.

Could I be wrong? Absolutely. Confirmation bias? Perhaps, but I've also gotten errors on this user while getting Minecraft to get past the launcher, an arbitrary problem I've never ran into besides on this user. I had my suspicions when that occurred, it's only now that I've decided to investigate. The workaround for now seems to be creating an entirely new user, as "renaming" your user doesn't change the name of the user in the C:\Users file path which is the only part that matters. Or there might possibly be some regedit magic you could pull off, but that's beyond my scope.

Lemme know if you test this out and find similar results. Thanks.

EDIT:

Here you go, went out of my way to make another Windows user named João Comassetto to test it out. Imported my Anki settings and deck the same way as last time, but I ran into an error when trying to recalc unlike last time. error2.txt

landonepps commented 3 years ago

This may potentially be a limitation of mecab itself. I know when I was using other mecab-based apps, I wasn't able to load a dictionary file when the directory name contained Japanese characters. I don't have a Windows computer, so I can't really investigate. Maybe a dev who works on Windows can look into it?

But as a temporary fix, try launching the program with the -b argument which lets you specify a different location for the data folder "C:\Program Files\Anki\anki.exe" -b "C:\AnkiDataFolder"

See the "Startup Options" section here: https://docs.ankiweb.net/#/files#startup-options