2009/10/18 G. <[email protected]>:
>
> Just wondering if anyone has thoughts as to what I might do to
> *identify* the problem here (given that I apparently have dvipng &
> latex installed & that they are located in the right path)?
>
> Is there anyway of looking into Mnemosyne to see where the problem is
> happening?
Hi Abel,
Maybe the best thing to do is add some debug code to Mnemosyne (a very
useful side-effect of it being open-source and distributed as Python
sourcecode!). If your copy of Mnemosyne is located in /Applications/,
then the file to look at is
/Applications/Mnemosyne.app/Contents/Resources/mnemosyne/core/mnemosyne_core.py
... if you search for the string "installed?" which shows up in the
error message, you'll find a function called "process_latex".
If it can't generate a PNG file from the latex code, it executes:
if not os.path.exists("tmp1.png"):
return error_str
But if it succeeded in making a PNG file, it will do:
return "<img src=\"" + latexdir + "/"+imag_name+"\" align=middle>"
In the midst of examining this and restarting Mnemosyne a couple of
times, it suddenly stopped working for me too!
Not quite sure what's going on, but I changed the error message to
also print the PATH environment variable:
if not os.path.exists("tmp1.png"):
return error_str + " latexdir: " + latexdir + " path: " +
os.getenv('PATH')
and the result is '/usr/bin:/bin:/usr/sbin:/sbin' which makes no
sense. The same is true when I check $PATH from the Python 3
interpreter.
Will have to debug this further... there should be a lot more entries
in the path.
Oisín
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"mnemosyne-proj-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/mnemosyne-proj-users?hl=en
-~----------~----~----~----~------~----~------~--~---