question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb4 in position 0: invalid start byte

See original GitHub issue

Hello. I trying to run examples/tutorial/2-Movement.py with no changes and get a error when I pressed numpad buttons.

24 bits font. key color : 0 0 0 Traceback (most recent call last): File "C:\Users\ilya_gorohov\Documents\tdltest\main.py", line 60, in <module> for event in tdl.event.get(): # Iterate over recent events. File "C:\Users\ilya_gorohov\AppData\Local\Programs\Python\Python36-32\lib\site-packages\tdl\event.py", line 384, in get _processEvents() File "C:\Users\ilya_gorohov\AppData\Local\Programs\Python\Python36-32\lib\site-packages\tdl\event.py", line 365, in _processEvents libkey.ralt, libkey.rctrl, libkey.shift)) File "C:\Users\ilya_gorohov\AppData\Local\Programs\Python\Python36-32\lib\site-packages\tdl\event.py", line 115, in __init__ char = char if isinstance(char, str) else char.decode() UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 0: unexpected end of data

Windows 10, Python 3.6, tdl 2.0.1

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
HexDecimalcommented, Mar 22, 2017

I’m able to repeat the _Bool issue on Python 3.6.1 (32-bit). That issue doesn’t show up in a 64-bit build.

libtcod doesn’t seem to define the modifier keys on SDL text events.

Released v3.0.1, which manually zeroes out those values as a temporary fix.

1reaction
HexDecimalcommented, Mar 22, 2017

New release v3.0.0 shouldn’t crash, but the event attributes will be mostly blank.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'utf8' codec can't decode byte 0xa5 in position 0: invalid start ...
I switched this simply by defining a different codec package in the read_csv() command: encoding = 'unicode_escape'.
Read more >
Python UnicodeDecodeError utf-8 codec can t decode byte ...
Python UnicodeDecodeError utf-8 codec can t decode byte 0xa0 in position 10 invalid start byte.
Read more >
'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
UnicodeDecodeError : ' utf-8 ' codec can't decode byte 0xff in position 0 : invalid start byte solved in Django .The error is...
Read more >
'utf8' codec can't decode byte 0xa5 in position 0: invalid start ...
Often, while reading the input files, you might encounter an UnicodeDecodeError. · Thus, the error means that the byte 0xa05 at position 0...
Read more >
UnicodeDecodeError: "utf-8" codec can't decode byte ... - GitHub
UnicodeDecodeError : "utf-8" codec can't decode byte in position : invalid start byte #37950. Closed. xav12358 opened this issue on Mar 26, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found