[wxPython-users] wx message problem on debian

Robin Dunn robin at alldunn.com
Tue Jul 4 19:22:54 PDT 2006


Michele Petrazzo wrote:
> Robin Dunn wrote:
>> Michele Petrazzo wrote:
>>> Robin Dunn wrote:
>>>> Michele Petrazzo wrote:
>>>>> My application call a wx.MessageBox:
>>>>>
>>>>>  File "hylapex.py", line 954, in contr_new_fax
>>>>>     wx.MessageBox(str(title), str(msg))
>>>>>   File 
>>>>> "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_misc.py", 
>>>>> line 483, in MessageBox
>>>>>     return _misc_.MessageBox(*args, **kwargs)
>>>>
>>>> What is the rest of the error message?
>>>>
>>>>
>>>
>>> Excuse me:
>>>   File "hylapex.py", line 943, in contr_new_fax
>>>     wx.MessageBox(str(msg), str(title), wx.ICON_INFORMATION)
>>>   File 
>>> "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_misc.py", 
>>> line 483, in MessageBox
>>>     return _misc_.MessageBox(*args, **kwargs)
>>> exceptions.TypeError: coercing to Unicode: need string or buffer, int 
>>> found
>>>
>>> Note that this happen _after_ the message are shown, so when I press on
>>> "Ok" button.
>>
>> What are the values of title and msg?
>>
> 
> #-- code
>  print repr(msg), repr(title), type(msg), type(title)
>  wx.MessageBox(str(msg), str(title), wx.ICON_INFORMATION)
> 
> michele:~$ python hylapex.py
> 'You have 10 new fax' 'New fax' <type 'str'> <type 'str'>
> 
> <-cut not wx code->
> 
>   File "hylapex.py", line 943, in contr_new_fax
>     wx.MessageBox(str(msg), str(title), wx.ICON_INFORMATION)
>   File 
> "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_misc.py", line 
> 483, in MessageBox
>     return _misc_.MessageBox(*args, **kwargs)
> exceptions.TypeError: coercing to Unicode: need string or buffer, int found

It's acting as if it is also expecting a unicode value for the 3rd 
parameter, but I don't see how that is possible unless something went 
strangely wrong with the build.

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list