mathtext and py2exe

hello,
I have written a program which uses matplotlib to plot some figures, it uses
mathtext to add some special chars (basically just the square on
acceleration units), and the program works just fine, but using py2exe to
build a windows executable, it fails somewhere drawing that square symbol.
The error the program yields is something like "unable to convert string to
unicode".
Has anyone experienced this kind of problem with mathtext and py2exe or has
any clue what is needed to be included at the py2exe setup.py to fix it?
I know this is not the best place for an answer, but I couldn't find where
to get help on py2exe site :-/ so if anyone could help...
Thanks a lot.

···

--
View this message in context: http://www.nabble.com/mathtext-and-py2exe-tp23319691p23319691.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

It sounds like it is not finding the appropriate fonts. Have you tried installing (in C:\Windows\Fonts) all of the ttf files included with matplotlib?

If that's not it, can you provide a complete traceback with the exact error message?

Mike

sordnay wrote:

···

hello,
I have written a program which uses matplotlib to plot some figures, it uses
mathtext to add some special chars (basically just the square on
acceleration units), and the program works just fine, but using py2exe to
build a windows executable, it fails somewhere drawing that square symbol. The error the program yields is something like "unable to convert string to
unicode". Has anyone experienced this kind of problem with mathtext and py2exe or has
any clue what is needed to be included at the py2exe setup.py to fix it?
I know this is not the best place for an answer, but I couldn't find where
to get help on py2exe site :-/ so if anyone could help...
Thanks a lot.

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Thanks for the quick answer,
I cant check now, it's also the reason why i didn't post the exact error
code,
but the program is supposed to use only Tahoma ttf font which I included on
the data files.

Michael Droettboom-3 wrote:

···

It sounds like it is not finding the appropriate fonts. Have you tried
installing (in C:\Windows\Fonts) all of the ttf files included with
matplotlib?

If that's not it, can you provide a complete traceback with the exact
error message?

Mike

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
View this message in context: http://www.nabble.com/mathtext-and-py2exe-tp23319691p23320374.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

The mathtext engine (by default at least) uses the Computer Modern fonts. Using a custom font, such as Tahoma, requires manual configuration.

Mike

sordnay wrote:

···

Thanks for the quick answer, I cant check now, it's also the reason why i didn't post the exact error
code, but the program is supposed to use only Tahoma ttf font which I included on
the data files.

Michael Droettboom-3 wrote:
  

It sounds like it is not finding the appropriate fonts. Have you tried installing (in C:\Windows\Fonts) all of the ttf files included with matplotlib?

If that's not it, can you provide a complete traceback with the exact error message?

Mike

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Hi,
Could you send your setup.
I'm not expert but I can check it.

/olivier

···

-----Original Message-----
From: sordnay [mailto:sordnay@…287…]
Sent: jeudi 30 avril 2009 18:23
To: matplotlib-users@lists.sourceforge.net
Subject: [Matplotlib-users] mathtext and py2exe

hello,
I have written a program which uses matplotlib to plot some figures, it
uses mathtext to add some special chars (basically just the square on
acceleration units), and the program works just fine, but using py2exe
to build a windows executable, it fails somewhere drawing that square
symbol.
The error the program yields is something like "unable to convert string
to unicode".
Has anyone experienced this kind of problem with mathtext and py2exe or
has any clue what is needed to be included at the py2exe setup.py to fix
it?
I know this is not the best place for an answer, but I couldn't find
where to get help on py2exe site :-/ so if anyone could help...
Thanks a lot.

--
View this message in context:
http://www.nabble.com/mathtext-and-py2exe-tp23319691p23319691.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

------------------------------------------------------------------------
------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users