cx_freeze TypeError:源代码字符串不能包含空字节

时间:2016-11-03 01:54:46

标签: python cx-freeze

我试图解决这个问题两天: setup.py

from cx_Freeze import setup, Executable

executables = [Executable("main.py",base="Win32GUI")]

setup(
    name="Life of Robert",
    version = "1.0",
    description = "An RPG with endless maps.",
    options={
    "build_exe":
            {
            "packages": ["pygame"],
            "include_files": ['Images/','Sounds/','Maps/','Houses/'],
            "includes": ["chest","gold","gui","message","player","settings","utils","wolf"],
            },

    },
    executables = executables

    )

每次我用python setup.py build运行它时,我得到: TypeError: source code string cannot contain null bytes

您可以在https://github.com/DrevanTonder/the-life-of-robert/blob/master/main.py

找到main.py.

我尝试在记事本++中打开main.py并显示隐藏的符号。 我在文件

中找不到任何nul\x00符号

我正在使用python 3.4

0 个答案:

没有答案