Error trying to generate readings

xChilla's Avatar

xChilla

29 Dec, 2015 08:33 AM

I swear I've done this successfully in the past, but today when I tried to generate readings it did not work.

Traceback (most recent call last):
File "C:\Users\Ashley\Documents\Anki\addons\japanese\bulkreading.py", line 58, in browser.connect(a, SIGNAL("triggered()"), lambda e=browser: onRegenerate(e)) File "C:\Users\Ashley\Documents\Anki\addons\japanese\bulkreading.py", line 63, in onRegenerate regenerateReadings(browser.selectedNotes()) File "C:\Users\Ashley\Documents\Anki\addons\japanese\bulkreading.py", line 48, in regenerateReadings note[dst] = mecab.reading(srcTxt) AttributeError: 'NoneType' object has no attribute 'reading'

  1. Support Staff 1 Posted by Damien Elmes on 29 Dec, 2015 11:44 PM

    Damien Elmes's Avatar

    Tried restarting Anki and adding a single new card? If the generation doesn't work, perhaps reinstalling the add-on will help.

  2. 2 Posted by xChilla on 02 Jan, 2016 01:42 AM

    xChilla's Avatar

    Still not working. I tried uninstalling/reinstalling the addon and it made no difference.

    By the way, I noticed that after deleting the addon (from Anki) it still remains in the addon folder... This seems to happen to ANY addon that is created inside a folder. The addons that are a single file, delete as they are supposed to.

    Anyway, after I manually deleted the Japanese support addon, and reinstalled... I tried again. The first time I tried generating a reading, absolutely nothing happened, so I tried a second time and got the error below.

    Not sure what else I can try.

    Anki Version: 2.0.33

    Traceback (most recent call last):
    File "C:\Users\Ashley\Documents\Anki\addons\japanese\bulkreading.py", line 58, in browser.connect(a, SIGNAL("triggered()"), lambda e=browser: onRegenerate(e)) File "C:\Users\Ashley\Documents\Anki\addons\japanese\bulkreading.py", line 63, in onRegenerate regenerateReadings(browser.selectedNotes()) File "C:\Users\Ashley\Documents\Anki\addons\japanese\bulkreading.py", line 48, in regenerateReadings note[dst] = mecab.reading(srcTxt) File "C:\Users\Ashley\Documents\Anki\addons\japanese\reading.py", line 79, in reading self.mecab.stdin.flush() IOError: [Errno 22] Invalid argument

  3. Support Staff 3 Posted by Damien Elmes on 05 Jan, 2016 10:29 AM

    Damien Elmes's Avatar

    Anki is trying to run the mecab.exe file in your add-ons folder and it's not working - you could try run it in a cmd.exe prompt to see if it spits out any error messages.

  4. 4 Posted by Green on 07 Jan, 2016 07:09 AM

    Green's Avatar

    Hello, Mr. Elmes and xChilla. I've been encountering a similar error message when I try to generate readings for new Japanese cards I am entering one by one. Here is the error text that Anki gives me:

    Traceback (most recent call last):
      File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.webview", line 18, in run
      File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.editor", line 462, in bridge
      File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.hooks", line 32, in runFilter
      File "C:\Users\User\Documents\Anki\addons\japanese\reading.py", line 209, in onFocusLost
        n[dst] = mecab.reading(srcTxt)
      File "C:\Users\User\Documents\Anki\addons\japanese\reading.py", line 79, in reading
        self.mecab.stdin.flush()
    IOError: [Errno 22] Invalid argument

    Mr. Elmes, I took your advice and ran mecab.exe in the command prompt. The error message it gave me was as follows:

    "mecab.exe - System Error
    The program can't start because libmecab.dll is missing from your computer. Try reinstalling the program to fix this problem."

    I have already tried uninstalling and reinstalling, and have restarted my computer as well. Do you have any other advice? If it helps, I am using Windows 7.

    Thank you in advance for any guidance you can provide. I am really looking forward to hearing from you, and I am so grateful for all you do.

  5. 5 Posted by Green on 08 Jan, 2016 02:12 AM

    Green's Avatar

    Hello, Mr. Elmes and xChilla,

    I think I may have figured out what the problem is for me.

    I have Norton Antivirus installed on my computer, and it was identifying the missing libmecab.dll file as "Trojan.Gen.SMH.2" whenever I tried to download it, and automatically blocking it.

    I'm trying to report this to Norton as a false positive, but the form for submission requires either a copy of the file (which Norton has preemptively deleted from my computer) or a direct download URL (which I don't have, because I downloaded the addon through Anki, not be clicking on a URL).

    I would be grateful for your advice on the best way to proceed. Once again, thank you very much for your attention.

  6. 6 Posted by Green on 08 Jan, 2016 02:40 AM

    Green's Avatar

    Hello again. I was able to restore the file and submit a report to Norton as a false positive. I think I should be all set. Thank you again for everything, and apologies for the many posts.

  7. Support Staff 7 Posted by Damien Elmes on 08 Jan, 2016 12:38 PM

    Damien Elmes's Avatar

    Hi Green,

    Thanks for taking the time to post a solution. xChilla, is your problem due to the same thing?

  8. 8 Posted by xChilla on 16 Jan, 2016 01:31 PM

    xChilla's Avatar

    Yes, Norton seemed to be the culprit! I got a notification that it deleted/quarantined my file as well.

    I had to reinstall the addon today and it didn't have any problem generating, so I think Norton has acknowledged that it's not a threat.

    Thank you both!

  9. xChilla closed this discussion on 16 Jan, 2016 01:31 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac