Re: [Matplotlib-users] problem with a umlaut
On Wed, 15 May 2013 10:40:47 + Ojala Janne janne.oj...@aalto.fi wrote: ['ä' Umlaut] pythonw -u bugtest.py Exit code: -1073740777 My installation (Python 2.6.6, MPL 1.2.1) is a bit more helpful with error messages: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 269: ordinal not in range(128) A similar error is raised with the other character you suggested. Unfortunately, I do not know about MPL's limitations related to unicode labels. I use text.usetex : True in my matplotlibrc. Regards Alex -- Alexander Eberspächer Theorie der Kondensierten Materie I Otto-von-Guericke-Universität Magdeburg Fon: +49 391 67 11339 -- AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] problem with a umlaut
I use text.usetex : True in my matplotlibrc. It works if I force it to tex, its still a nasty bug of somekind. What I would like to know what changes in the processing when you have both those characters present? Does it fallback to tex use at some point? If so why does it not fallback for ä automatically. -- AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] problem with a umlaut
Which backend are you using? I can't reproduce. Does https://github.com/matplotlib/matplotlib/blob/master/examples/text_labels_and_annotations/unicode_demo.pyhttps://github.com/matplotlib/matplotlib/blob/master/examples/text_labels_and_annotations/unicode_demo.py work for you? The bug only happens if I try to save the figure as EPS. So I suppose that then means its a cairo back end (happens also if I force cairo). So that means as written the code works fine but if i try to make publishable quality output by saving as EPS (a raster image is not suitable), it crashes. But it again works if I add any character thats so weird that ist on a n extended unicode block then all characters seem to be handled correctly. Even the ones that previously crashed. -- AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] problem with a umlaut
On 5/15/2013 1:55 PM, Ojala Janne wrote: Which backend are you using? I can't reproduce. Does https://github.com/matplotlib/matplotlib/blob/master/examples/text_labels_and_annotations/unicode_demo.py https://github.com/matplotlib/matplotlib/blob/master/examples/text_labels_and_annotations/unicode_demo.py work for you? The bug only happens if I try to save the figure as EPS. So I suppose that then means its a cairo back end (happens also if I force cairo). So that means as written the code works fine but if i try to make publishable quality output by saving as EPS (a raster image is not suitable), it crashes. But it again works if I add any character thats so weird that ist on a n extended unicode block then all characters seem to be handled correctly. Even the ones that previously crashed. I can reproduce the crash on Python 2.7, 32 and 64 bit. Python 2.6 and 3.3 appear to work. The call stack is attached. The crash is in ttfont_add_glyph_dependencies() at https://github.com/matplotlib/matplotlib/blob/v1.2.x/ttconv/pprdrv_tt2.cpp#L703 Christoph msvcr90.dll!__crt_debugger_hook(int _Reserved=0) Line 65 C msvcr90.dll!_invoke_watson(const wchar_t * pszExpression=0x0022e750, const wchar_t * pszFunction=0x798363d3, const wchar_t * pszFile=0x05ed9ddc, unsigned int nLine=109701576, unsigned __int64 pReserved=0) Line 233 C++ msvcr90.dll!_invalid_parameter(const wchar_t * pszExpression=0x05f649a8, const wchar_t * pszFunction=0x05b8ce88, const wchar_t * pszFile=0x0022e708, unsigned int nLine=2288096, unsigned __int64 pReserved=0) Line 115C++ msvcr90.dll!_invalid_parameter_noinfo() Line 126 C++ ttconv.pyd!std::_Vector_const_iteratorint,std::allocatorint ::operator*() Line 106 C++ ttconv.pyd!std::_Vector_iteratorint,std::allocatorint ::operator*() Line 340 C++ ttconv.pyd!ttfont_add_glyph_dependencies(TTFONT * font=0x0022e8c0, std::vectorint,std::allocatorint glyph_ids=[13](17,19,20,21,22,23,24,25,26,27,28,36,174)) Line 703 + 0xd bytes C++ ttconv.pyd!read_font(const char * filename=0x05f7fa60, font_type_enum target_type=PS_TYPE_3, std::vectorint,std::allocatorint glyph_ids=[13](17,19,20,21,22,23,24,25,26,27,28,36,174), TTFONT font={...}) Line 1326 C++ ttconv.pyd!insert_ttfont(const char * filename=0x05f7fa60, TTStreamWriter stream={...}, font_type_enum target_type=PS_TYPE_3, std::vectorint,std::allocatorint glyph_ids=[13](17,19,20,21,22,23,24,25,26,27,28,36,174)) Line 1336 C++ ttconv.pyd!convert_ttf_to_ps(_object * self=0x, _object * args=0x05f649a8, _object * kwds=0x) Line 149 + 0x1f bytesC++ python27.dll!PyCFunction_Call(_object * func=0x0004, _object * arg=0x01d57760, _object * kw=0x05b8ce88) Line 85 + 0x8 bytesC python27.dll!call_function(_object * * * pp_stack=0x, int oparg=131) Line 4021 + 0xaf bytesC python27.dll!PyEval_EvalFrameEx(_frame * f=0x05ceddf8, int throwflag=99512536) Line 2670 C python27.dll!PyEval_EvalCodeEx(PyCodeObject * co=0x05f725b0, _object * globals=0x0009, _object * locals=0x0001, _object * * args=0x, int argcount=9, _object * * kws=0x05bb31a0, int kwcount=1, _object * * defs=0x05f6e3c0, int defcount=6, _object * closure=0x) Line 3253 + 0xa bytes C python27.dll!function_call(_object * func=0x05f7c588, _object * arg=0x05b729a8, _object * kw=0x0009) Line 531 + 0x3b bytes C python27.dll!PyObject_Call(_object * func=0x05b729a8, _object * arg=0x05fd7798, _object * kw=0x) Line 2530 C python27.dll!ext_do_call(_object * func=0x05f7c588, _object * * * pp_stack=0x0002, int flags=9384, int na=9, int nk=0) Line 4334 + 0xe bytes C python27.dll!PyEval_EvalFrameEx(_frame * f=0x05b20d18, int throwflag=95362448) Line 2708 C python27.dll!PyEval_EvalCodeEx(PyCodeObject * co=0x05f72430, _object * globals=0x0003, _object * locals=0x0005, _object * * args=0x05f63c50, int argcount=3, _object * * kws=0x05f7a1e0, int kwcount=5, _object * * defs=0x, int defcount=0, _object * closure=0x) Line 3253 + 0xa bytes C python27.dll!function_call(_object * func=0x05f7c518, _object * arg=0x01e7a750, _object * kw=0x0009) Line 531 + 0x3b bytes C python27.dll!PyObject_Call(_object * func=0x01e7a750, _object * arg=0x05fd5818, _object * kw=0x01d61048) Line 2530 C python27.dll!ext_do_call(_object *
Re: [Matplotlib-users] problem with a umlaut
I've created an issue in the tracker for this: https://github.com/matplotlib/matplotlib/issues/2016 Mike On 05/15/2013 06:26 PM, Christoph Gohlke wrote: On 5/15/2013 1:55 PM, Ojala Janne wrote: Which backend are you using? I can't reproduce. Does https://github.com/matplotlib/matplotlib/blob/master/examples/text_labels_and_annotations/unicode_demo.py https://github.com/matplotlib/matplotlib/blob/master/examples/text_labels_and_annotations/unicode_demo.py work for you? The bug only happens if I try to save the figure as EPS. So I suppose that then means its a cairo back end (happens also if I force cairo). So that means as written the code works fine but if i try to make publishable quality output by saving as EPS (a raster image is not suitable), it crashes. But it again works if I add any character thats so weird that ist on a n extended unicode block then all characters seem to be handled correctly. Even the ones that previously crashed. I can reproduce the crash on Python 2.7, 32 and 64 bit. Python 2.6 and 3.3 appear to work. The call stack is attached. The crash is in ttfont_add_glyph_dependencies() at https://github.com/matplotlib/matplotlib/blob/v1.2.x/ttconv/pprdrv_tt2.cpp#L703 Christoph -- AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users