# 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)

**URL:** <https://community.shotgridsoftware.com/t/when-i-try-to-upload-with-the-python-api-i-get-this-error-unicodedecodeerror-ascii-codec-cant-decode-byte-0xb6-in-position-1009-ordinal-not-in-range-128/7915>\
**Category:** Pipeline Integrations\
**Created:** [March 27, 2020, 4:21pm UTC](https://community.shotgridsoftware.com/t/when-i-try-to-upload-with-the-python-api-i-get-this-error-unicodedecodeerror-ascii-codec-cant-decode-byte-0xb6-in-position-1009-ordinal-not-in-range-128/7915 "2020-03-27T16:21:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandon.foster](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/brandon.foster/32/91_2.png) [@brandon.foster](https://community.shotgridsoftware.com/u/brandon.foster)\
**Post date:** [March 27, 2020, 4:21pm UTC](https://community.shotgridsoftware.com/t/when-i-try-to-upload-with-the-python-api-i-get-this-error-unicodedecodeerror-ascii-codec-cant-decode-byte-0xb6-in-position-1009-ordinal-not-in-range-128/7915/1 "2020-03-27T16:21:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![brandon.foster](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/brandon.foster/32/91_2.png) [@brandon.foster](https://community.shotgridsoftware.com/u/brandon.foster)\
**Post date:** [March 27, 2020, 4:21pm UTC](https://community.shotgridsoftware.com/t/when-i-try-to-upload-with-the-python-api-i-get-this-error-unicodedecodeerror-ascii-codec-cant-decode-byte-0xb6-in-position-1009-ordinal-not-in-range-128/7915/2 "2020-03-27T16:21:49Z")

</div>

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:

```auto
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!
