Hello!

 

New message, please read <http://paulthepoolguy.com/an.php?8a>

 

Vera Mccoy




---

** [bugs:#65] PyX crashes when trying to write a non-ascii character**

**Status:** closed
**Group:** PyX
**Created:** Tue Feb 09, 2016 09:33 AM UTC by mmb
**Last Updated:** Tue Feb 09, 2016 01:02 PM UTC
**Owner:** nobody


Hi all,

PyX fails, when trying to write non-ascii-characters. 
PyX-Version is 14.1
Python-Version is 3.4.3

A minimal example and the corresponding Traceback follow:

~~~~
 # -*- coding: utf-8 -*-
 
from pyx import *
c = canvas.canvas()
c.text(0, 1, r"Test ä")
c.writeEPSfile("Test")
~~~~

Traceback:

  File "Test.py", line 7, in <module>
    c.text(0, 1, r"Test ä")
  File "/usr/lib/python3.4/site-packages/pyx/canvas.py", line 409, in text
    return self.insert(self.texrunner.text(x, y, atext, *args, **kwargs))
  File "/usr/lib/python3.4/site-packages/pyx/text.py", line 1428, in wrapped
    return f(self, *args, **kwargs)
  File "/usr/lib/python3.4/site-packages/pyx/text.py", line 1464, in text
    return self.instance.text(*args, **kwargs)
  File "/usr/lib/python3.4/site-packages/pyx/text.py", line 1304, in text
    return self.text_pt(unit.topt(x), unit.topt(y), *args, **kwargs)
  File "/usr/lib/python3.4/site-packages/pyx/text.py", line 1278, in text_pt
    left_pt, right_pt, height_pt, depth_pt = self.do_typeset(expr, 
self.texmessages_run_default + self.texmessages_run + texmessages)
  File "/usr/lib/python3.4/site-packages/pyx/text.py", line 1204, in do_typeset
    return self._execute(expr, texmessages, STATE_TYPESET, STATE_TYPESET)
  File "/usr/lib/python3.4/site-packages/pyx/text.py", line 1073, in _execute
    self.texinput.write(expr)
UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in position 20: 
ordinal not in range(128)
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/pyx/text.py", line 1022, in _cleanup
    self.do_finish()
  File "/usr/lib/python3.4/site-packages/pyx/text.py", line 1212, in do_finish
    self.go_finish()
  File "/usr/lib/python3.4/site-packages/pyx/text.py", line 1338, in go_finish
    self._execute("\\end%\n", self.texmessages_end_default + 
self.texmessages_end, STATE_TYPESET, STATE_DONE)
  File "/usr/lib/python3.4/site-packages/pyx/text.py", line 1064, in _execute
    self.texoutput.expect(None)
  File "/usr/lib/python3.4/site-packages/pyx/text.py", line 647, in expect
    self._expect.put_nowait(s)
  File "/usr/lib/python3.4/queue.py", line 187, in put_nowait
    return self.put(item, block=False)
  File "/usr/lib/python3.4/queue.py", line 133, in put
    raise Full
queue.Full


---

Sent from sourceforge.net because [email protected] is subscribed 
to https://sourceforge.net/p/pyx/bugs/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/pyx/admin/bugs/options.  Or, if this is a mailing 
list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
PyX-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-devel

Reply via email to