rumps
rumps copied to clipboard
Bug: Unicode Decode Error
I got the following error, while trying to display the word "Pokémon®" in a rumps app:
2015-02-25 16:01:37.003 Python[36982:781751] <type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xc2 in position 28: ordinal not in range(128)
2015-02-25 16:01:37.004 Python[36982:781751] (
0 CoreFoundation 0x00007fff8ba1866c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff8f18876e objc_exception_throw + 43
2 CoreFoundation 0x00007fff8ba18209 -[NSException raise] + 9
3 _objc.so 0x000000010710f3fe PyObjCErr_ToObjCWithGILState + 46
4 _objc.so 0x0000000107117030 -[OC_PythonObject forwardInvocation:] + 784
5 CoreFoundation 0x00007fff8b9628a6 ___forwarding___ + 518
6 CoreFoundation 0x00007fff8b962618 _CF_forwarding_prep_0 + 120
7 Foundation 0x00007fff875e2db3 __NSFireTimer + 95
8 CoreFoundation 0x00007fff8b96bb64 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
9 CoreFoundation 0x00007fff8b96b7f3 __CFRunLoopDoTimer + 1059
10 CoreFoundation 0x00007fff8b9dedbd __CFRunLoopDoTimers + 301
11 CoreFoundation 0x00007fff8b928288 __CFRunLoopRun + 2024
12 CoreFoundation 0x00007fff8b927858 CFRunLoopRunSpecific + 296
13 HIToolbox 0x00007fff954dbaef RunCurrentEventLoopInMode + 235
14 HIToolbox 0x00007fff954db76e ReceiveNextEventCommon + 179
15 HIToolbox 0x00007fff954db6ab _BlockUntilNextEventMatchingListInModeWithFilter + 71
16 AppKit 0x00007fff88642f81 _DPSNextEvent + 964
17 AppKit 0x00007fff88642730 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
18 AppKit 0x00007fff88636593 -[NSApplication run] + 594
19 _objc.so 0x0000000107124797 ffi_call_unix64 + 79
20 ??? 0x00007fff58ee0490 0x0 + 140734685381776
)
Process finished with exit code 137
Is this something you can do anything about?
(PS, rumps is AMAZING! I can't believe I could get a full program working in like, two hours with config and options and everything so easily!)
>>> a = 'Pokémon®'
>>> unicode(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3: ordinal not in range(128)
>>>
>>> b = u'Pokémon®'
>>> unicode(b)
u'Pok\xe9mon\xae'