Unicode error in running Flow with Chinese characters on Windows

Hi all,

I’m trying to run a flow which contains a string with Chinese characters (in my case an SQL query which contains the characters ‘取消’). After deploying this code (Prefect 2 Orion), and adding the Flow through a Queue which is executed by an Agent running on a Windows system I get the following error: ‘utf-8’ codec can’t decode byte 0xcf in position 136: invalid continuation byte. This only happens when the Chinese characters are present in the string.

The flow can run normally on agents on Ubuntu and Mac systems. The code can also run normally when testing locally on the Windows computer. Only when running it after deployment as an agent it creates this error.

Could there be a problem with how the Chinese characters are decoded on the Windows agent? Any workaround I could try to solve this issue? Thanks!

Hey, I don’t think this is related to Prefect. Can you try solutions from this thread?