When I try to upload with the Python API I get this error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xb6 in position 1009: ordinal not in range(128)

What the heck does UnicodeDecodeError: 'ascii' codec can't decode byte 0xb6 in position 1009: ordinal not in range(128) mean?

2 Likes

This can be caused by a couple of different reasons, but here is the most common cause we’ve seen. When you establish your Shotgun connection:

sg = Shotgun(SG_SERVER, SG_SCRIPT_NAME, SG_SCRIPT_KEY)

If the strings you use in your connection are Unicode, that will cause the aforementioned error. Be sure your strings are ASCII when establishing your connection, and you’ll be good to go!

3 Likes