Skip to content

1 10 月, 2019

[已解決] Python SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-5: truncated \UXXXXXXXX escape

Last Updated on 2021-10-12 by Clay

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-5: truncated \UXXXXXXXX escape


SyntaxError 是 Python 中一個表示『語法錯誤』的訊息、 unicodeescape 指的是 Unicode 編碼的跳脫字元 (escape) 。這樣一來,是不是比較好理解上面這個錯誤訊息了呢?沒錯,那就是你在 Python 中出現了關於 Unicode 編碼的 SyntaxError (語法錯誤)!

Read More »[已解決] Python SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-5: truncated \UXXXXXXXX escape
Exit mobile version