# Python error - unicodeescape codec can't decode bytes
[[Python]]
## The error
```shell
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
```
I encountered this when someone was attempting to run [[downloadfirebase.py]] and [this Python script](https://gist.github.com/Joilence/82e1433870c538db12086e06ac7975f7). He was using Windows.
## The cause
This error is caused by the difference in how paths are set in Windows. On Linux, a path is set `like/this` , but on Windows, they're set `C:\like\this`. The `\` character is an escape character in Python. [^stackoverflow]
## The solution
### Set the path using a raw string
```python
path = r"C:\Users\nic\path"
```
### Change the direction of the slashes in the path
Use slashes instead of backslashes:
```python
path = "C:/Users/nic/path"
```
### Escape the slashes
```python
path = "C:\\Users\\nic\\path"
```
[^stackoverflow]: https://stackoverflow.com/questions/37400974/unicode-error-unicodeescape-codec-cant-decode-bytes-in-position-2-3-trunca