Re: [matplotlib-devel] Small fix for SVG backend

2010-12-17 Thread Dieter Weber
Hi Mike, the patch resolved my problem. Thanks a lot! Greetings, Dieter -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and

Re: [matplotlib-devel] Small fix for SVG backend

2010-12-17 Thread Michael Droettboom
Can you try applying the attached patch and let me know if it resolves the problem for you? Mike On 12/17/2010 04:22 AM, Dieter Weber wrote: Hi Mike, sorry, I forgot my platform in my last mail! I am running Ubuntu 10.04.1 LTS x86_64 Python: 2.6.5, Ubuntu matplotlib: svn trunk, revision 8841

Re: [matplotlib-devel] Small fix for SVG backend

2010-12-17 Thread Dieter Weber
Hi Mike, sorry, I forgot my platform in my last mail! I am running Ubuntu 10.04.1 LTS x86_64 Python: 2.6.5, Ubuntu matplotlib: svn trunk, revision 8841 All other dependencies of matplotlib are installed as "normal" packages of the distribution. Versions can be found here: http://packages.ubuntu.

Re: [matplotlib-devel] Small fix for SVG backend

2010-12-16 Thread Michael Droettboom
What platform are you on? It "works for me" on Fedora 14, RHEL 5 and Cygwin. Mike On 12/16/2010 10:59 AM, Dieter Weber wrote: > #!/usr/bin/env python > # -*- coding: utf-8 -*- > import matplotlib > import matplotlib.pyplot as pp > import tempfile > import cStringIO as StringIO > > matplotlib.rc

Re: [matplotlib-devel] Small fix for SVG backend

2010-12-16 Thread Dieter Weber
Hi Mike, the error only occurs if the output file is specified as a file(-like) object instead of a file name. This is necessary for me in order to add a matplotlib-generated file to a tar archive via a safe temporary file. Greetings, Dieter #!/usr/bin/env python # -*- coding: utf-8 -*- import mat

Re: [matplotlib-devel] Small fix for SVG backend

2010-12-16 Thread Michael Droettboom
Unfortunately, this isn't a complete solution. The purpose of the "escape_xml_chars" function is to escape characters that have special meaning in XML, e.g. "&" -> "&", "<" -> "<" etc. The "xmlcharrefreplace" option on encode() does not do that. I am surprised that you got this traceback, as