id

1

publisher

goffi@goffi.org/d08fc2c8-30c5-4081-bff7-2f0f733436e8

title
Traceback at connection time (urwid.util.TagMarkupException)
author
Florent Le Coz
created
13/01/2011, 12:58
updated
13/01/2011, 18:49
labels
Primitivus
type
bug
status
review
priority
normal
milestone
0.7
severity
normal
body
I start primitivus, connect to my account (already saved in the software) and immediately get this: Traceback (most recent call last): File "/usr/bin/primitivus", line 508, in <module> sat.start() File "/usr/bin/primitivus", line 131, in start self.loop.run() File "/usr/lib64/python2.7/site-packages/urwid/main_loop.py", line 169, in run self.screen.run_wrapper(self._run) File "/usr/lib64/python2.7/site-packages/urwid/raw_display.py", line 233, in run_wrapper return fn() File "/usr/lib64/python2.7/site-packages/urwid/main_loop.py", line 187, in _run self.event_loop.run() File "/usr/lib64/python2.7/site-packages/urwid/main_loop.py", line 687, in wrapper return f(*args,**kargs) File "/usr/lib64/python2.7/site-packages/urwid/main_loop.py", line 602, in io_callback callback() File "/usr/lib64/python2.7/site-packages/urwid/main_loop.py", line 233, in _update self.process_input(keys) File "/usr/lib64/python2.7/site-packages/urwid/main_loop.py", line 318, in process_input k = self.widget.keypress(self.screen_size, k) File "/usr/lib64/python2.7/site-packages/urwid/container.py", line 894, in keypress key = self.focus_item.keypress( tsize, key ) File "/usr/lib64/python2.7/site-packages/urwid/container.py", line 1332, in keypress key = w.keypress( (mc,)+size[1:], key ) File "/usr/lib64/python2.7/site-packages/urwid/container.py", line 613, in keypress return self.body.keypress( (maxcol, remaining), key ) File "/usr/lib64/python2.7/site-packages/urwid/listbox.py", line 741, in keypress key = focus_widget.keypress((maxcol,),key) File "/usr/lib64/python2.7/site-packages/urwid/wimp.py", line 502, in keypress self._emit('click') File "/usr/lib64/python2.7/site-packages/urwid/widget.py", line 215, in _emit signals.emit_signal(self, name, self, *args) File "/usr/lib64/python2.7/site-packages/urwid/signals.py", line 125, in emit result |= bool(callback(*args_copy)) File "/usr/lib/python2.7/site-packages/sat_frontends/primitivus/profile_manager.py", line 123, in onConnectProfile self.host.plug_profile(profile) File "/usr/bin/primitivus", line 266, in plug_profile QuickApp.plug_profile(self, profile_key) File "/usr/lib/python2.7/site-packages/sat_frontends/quick_frontend/quick_app.py", line 145, in plug_profile self.presenceUpdate(jabber_id, show, priority, statuses, profile) File "/usr/lib/python2.7/site-packages/sat_frontends/quick_frontend/quick_app.py", line 254, in presenceUpdate self.contactList.replace(from_jid, self.CM.getAttr(from_jid, 'groups')) File "/usr/lib/python2.7/site-packages/sat_frontends/primitivus/contact_list.py", line 150, in replace self.frame.body = self.__buildList() File "/usr/lib/python2.7/site-packages/sat_frontends/primitivus/contact_list.py", line 117, in __buildList self.__buildContact(content, self.groups[key][1]) File "/usr/lib/python2.7/site-packages/sat_frontends/primitivus/contact_list.py", line 99, in __buildContact selected = contact==self.selected, header=header) File "/usr/lib/python2.7/site-packages/urwid_satext/sat_widgets.py", line 148, in __init__ self.setState(selected) File "/usr/lib/python2.7/site-packages/urwid_satext/sat_widgets.py", line 214, in setState self.__set_txt() File "/usr/lib/python2.7/site-packages/urwid_satext/sat_widgets.py", line 205, in __set_txt self._w.base_widget.set_text(txt_list) File "/usr/lib64/python2.7/site-packages/urwid/widget.py", line 500, in set_text self._text, self._attrib = decompose_tagmarkup(markup) File "/usr/lib64/python2.7/site-packages/urwid/util.py", line 366, in decompose_tagmarkup tl, al = _tagmarkup_recurse( tm, None ) File "/usr/lib64/python2.7/site-packages/urwid/util.py", line 385, in _tagmarkup_recurse tl, al = _tagmarkup_recurse( element, attr ) File "/usr/lib64/python2.7/site-packages/urwid/util.py", line 403, in _tagmarkup_recurse return _tagmarkup_recurse( element, attr ) File "/usr/lib64/python2.7/site-packages/urwid/util.py", line 410, in _tagmarkup_recurse raise TagMarkupException, "Invalid markup element: %r" % tm urwid.util.TagMarkupException: Invalid markup element: dbus.String(u'Name Surname') Note that "Name Surname" is in fact the name of one of my contacts.
comments_uri
xmpp:pubsub.goffi.org?;node=urn%3Axmpp%3Amicroblog%3A0%3Acomments%2Forg.salut-a-toi.tickets%3A0_1
That's a know issue: Dbus return dbus.String which is a subclass of unicode, but Urwid do a strict type check, and so doesn't accept dbus.String. I have sent a patch to urwid's devs which was accepted and integrated, but it will take some time to go into distributions. I have done a Q&D workaround in Changeset 3bc4457687a2

You are not logged. You need to log in to comment.