SyntaxError: Non-ASCII character '\xf0'

Hi! I am in the episode 9 - Running Python Code, I follow the instructions in the video
press ctl+alt+n after install Code runner, but this show me the next text:

[Running] python -u “/Users/rbguerra/Documents/HelloWorld/app.py”
File “/Users/rbguerra/Documents/HelloWorld/app.py”, line 1
SyntaxError: Non-ASCII character ‘\xf0’ in file /Users/rbguerra/Documents/HelloWorld/app.py on line 1, but no encoding declared; see PEP 263 – Defining Python Source Code Encodings | peps.python.org for details

[Done] exited with code=1 in 0.054 seconds

Thank you for your help

I think the code runner just does not support Unicode very well. I would just use the built-in runner (the play button in the top right of VSCode) or the terminal instead.

2 Likes