Back

Kanji, success graphs, and estimated minimum due cards plugin fix

#1
I've updated the 'Kanji and success graphs' plugin to work properly on windows or other systems using a binary install of Anki and it's built-in matplotlib library.

I found the Estimated Minimum Due Cards graph to be extremely helpful on my linux box (where an external matplotlib lib is used), but all the windows machines I tried it on were giving an error about MATPLOTLIBDATA, which I was able to fix by lazy loading the module as suggested by resolve awhile back.

It's available on Anki under 'Kanji and success graph v1.2'.
Reply
#2
Mmm, downloading now...
Reply
#3
I don't suppose you tested in osx? When I start up Anki I get the following ~

An error occurred in a plugin. Please contact the plugin author.
Please do not file a bug report with Anki.

Traceback (most recent call last):
File "ankiqt/ui/main.pyc", line 2571, in loadPlugins
File "/Users/pachecomicheal/Library/Application Support/Anki/plugins/Kanji and success graphs.py", line 40, in
File "/Applications/Anki.app/Contents/Resources/lib/python2.6/matplotlib/__init__.py", line 709, in
File "/Applications/Anki.app/Contents/Resources/lib/python2.6/matplotlib/__init__.py", line 627, in rc_params
File "/Applications/Anki.app/Contents/Resources/lib/python2.6/matplotlib/__init__.py", line 569, in matplotlib_fname
File "/Applications/Anki.app/Contents/Resources/lib/python2.6/matplotlib/__init__.py", line 240, in wrapper
File "/Applications/Anki.app/Contents/Resources/lib/python2.6/matplotlib/__init__.py", line 483, in _get_data_path_cached
File "/Applications/Anki.app/Contents/Resources/lib/python2.6/matplotlib/__init__.py", line 453, in _get_data_path
RuntimeError: Path in environment MATPLOTLIBDATA not a directory
Reply
May 16 - 30 : Pretty Big Deal: Save 31% on all Premium Subscriptions! - Sign up here
JapanesePod101
#4
[Image: ddsdp.png]

windows 7
Reply
#5
jettyke Wrote:http://img571.imageshack.us/img571/7120/ddsdp.png

windows 7
You seem not to have the Japanese Support files installed, is that correct?
Reply
#6
mpacheco Wrote:I don't suppose you tested in osx? When I start up Anki I get the following ~

An error occurred in a plugin. Please contact the plugin author.
Please do not file a bug report with Anki.

Traceback (most recent call last):
File "ankiqt/ui/main.pyc", line 2571, in loadPlugins
File "/Users/pachecomicheal/Library/Application Support/Anki/plugins/Kanji and success graphs.py", line 40, in
File "/Applications/Anki.app/Contents/Resources/lib/python2.6/matplotlib/__init__.py", line 709, in
File "/Applications/Anki.app/Contents/Resources/lib/python2.6/matplotlib/__init__.py", line 627, in rc_params
File "/Applications/Anki.app/Contents/Resources/lib/python2.6/matplotlib/__init__.py", line 569, in matplotlib_fname
File "/Applications/Anki.app/Contents/Resources/lib/python2.6/matplotlib/__init__.py", line 240, in wrapper
File "/Applications/Anki.app/Contents/Resources/lib/python2.6/matplotlib/__init__.py", line 483, in _get_data_path_cached
File "/Applications/Anki.app/Contents/Resources/lib/python2.6/matplotlib/__init__.py", line 453, in _get_data_path
RuntimeError: Path in environment MATPLOTLIBDATA not a directory
Does the original version of the plugin work? I'm curious if my fix broke osx support or just didn't fix what was already broken.

At least, that error message is basically what I would get on windows with the original plugin.
Edited: 2010-11-06, 9:53 am
Reply
#7
The actual graphs work fine for me but whenever I click the Show/Hide button I get the following error...

Traceback (most recent call last):
File "ankiqt\ui\graphs.pyc", line 273, in onShowHide
KeyError: 'edue'

...and I'm unable to choose which graphs to show & hide.

Windows Vista btw.
Reply
#8
harhol Wrote:The actual graphs work fine for me but whenever I click the Show/Hide button I get the following error...

Traceback (most recent call last):
File "ankiqt\ui\graphs.pyc", line 273, in onShowHide
KeyError: 'edue'

...and I'm unable to choose which graphs to show & hide.

Windows Vista btw.
Hmm, I can reproduce the same issue on Linux with the original plugin (v1.1). Perhaps it had more issues than I thought.
Reply
#9
overture2112 Wrote:Does the original version of the plugin work? I'm curious if my fix broke osx support or just didn't fix what was already broken.

At least, that error message is basically what I would get on windows with the original plugin.
I hadn't tried the original version.. if you can make it available I'll download and test and report back. Smile
Reply
#10
mpacheco Wrote:I hadn't tried the original version.. if you can make it available I'll download and test and report back. Smile
The original is available as "kanji and success graphs" (and noted as v1.1 in the code) and mine is listed as "kanji and success graph v1.2" [sic]. Both are available via anki's shared plugin viewer.
Edited: 2010-11-06, 10:54 am
Reply
#11
overture2112 Wrote:The original is available as "kanji and success graphs" (and noted as v1.1 in the code) and mine is listed as "kanji and success graph v1.2" [sic]. Both are available via anki's shared plugin viewer.
Oh snap.

I was using the old version of the plugin. :\

v1.2 works great, but I'm getting the same Show/Hide error harhol already brought up.
Reply
#12
mpacheco Wrote:v1.2 works great, but I'm getting the same Show/Hide error harhol already brought up.
Oh good, then my fix works (ie, removes the MATPLOTLIBDATA error by lazy loading the module) for win/osx.

I've never used the Show/Hide feature so I didn't notice that was broken as well (although it seems that never worked on any OS afaik). Perhaps someone with knowledge of anki's graph system can look, otherwise I'll try to check it out next week.
Reply
#13
KanjiDevourer Wrote:
jettyke Wrote:http://img571.imageshack.us/img571/7120/ddsdp.png

windows 7
You seem not to have the Japanese Support files installed, is that correct?
correct! Thanks.
Edited: 2010-11-06, 1:06 pm
Reply
#14
Does anyone know why Kanji graphs' data is not being shown to me anymore...I would guess that something happened, maybe because of a newer version of anki...

And also the kanji info plugin doesn't show any information
EDIT: I found the problem. Added 'Japanese' to the model name.
Edited: 2011-03-12, 3:28 pm
Reply