Python Forum

Full Version: Code example in zipapp not work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have followed examples in https://docs.python.org/3/library/zipapp...executable.

However, got an error when I try to execute it.
>zastub.exe
  File "zastub.exe", line 1
SyntaxError: Non-UTF-8 code starting with '\x90' in file zastub.exe on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
but no one told me where to declared encoding for an exe file. I have add # coding=utf8 to the python compile script but not work.
How to resolve this problem? My system default encoding is gbk.