[Urwid] graph.py -- encoding error

Rebecca Breu rebecca at rbreu.de
Tue Jul 18 11:29:56 EDT 2006


Hi.

I just tested the example graph.py of the latest release.

On one machine I get:


Traceback (most recent call last):
  File "./graph.py", line 375, in ?
    main()
  File "./graph.py", line 372, in main
    GraphController().main()
  File "./graph.py", line 315, in __init__
    self.view = GraphView( self )
  File "./graph.py", line 129, in __init__
    urwid.WidgetWrap.__init__(self, self.main_window())
  File "./graph.py", line 295, in main_window
    vline = urwid.AttrWrap( urwid.SolidFill(u'\u2502'), 'line')
  File "./urwid/widget.py", line 91, in __init__
    c = Text(fill_char).render((1,))
  File "./urwid/widget.py", line 188, in render
    return apply_text_layout( text, attr, trans, maxcol )
  File "./urwid/canvas.py", line 353, in apply_text_layout
    tseg, cs = apply_target_encoding(
  File "./urwid/util.py", line 104, in apply_target_encoding
    s = s.encode( _target_encoding )
UnicodeError: Latin-1 encoding error: ordinal not in range(256)



I'm not sure: Is graph.py supposed to work with encodings other than unicode?
Since you, Ian, said that some unicode characters are now converted I thought
I might be lucky...

However, there's lots of useful new stuff in urwid 0.9.5. I really
appreciate your work. :-)


Rebecca





More information about the Urwid mailing list