python - Pyinstaller,py2exe,cx-Freeze TypeError: compile() expected string without null bytes -
enter image description here code 1 sentence "print "hello world", before reinstall system, can successful, have problem. knows happened? coding problem system?
c:\users\zzx\desktop\a>type wo.py print "nihao" c:\users\zzx\desktop\a>pyinstaller -f wo.py traceback (most recent call last): file "c:\python27\scripts\pyinstaller-script.py", line 11, in <module> load_entry_point('pyinstaller==3.1.1', 'console_scripts', 'pyinstaller')() file "c:\python27\lib\site-packages\pyinstaller\__main__.py", line 90, in run run_build(pyi_config, spec_file, **vars(args)) file "c:\python27\lib\site-packages\pyinstaller\__main__.py", line 46, in run_build pyinstaller.building.build_main.main(pyi_config, spec_file, **kwargs) file "c:\python27\lib\site-packages\pyinstaller\building\build_main.py", line 755, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) file "c:\python27\lib\site-packages\pyinstaller\building\build_main.py", line 701, in build exec(text, spec_namespace) file "<string>", line 16, in <module> file "c:\python27\lib\site-packages\pyinstaller\building\build_main.py", line 212, in __init__ self.__postinit__() file "c:\python27\lib\site-packages\pyinstaller\building\datastruct.py", line 183, in __postinit__ self.assemble() file "c:\python27\lib\site-packages\pyinstaller\building\build_main.py", line 434, in assemble imphook_object.update_dependencies(self.graph) file "c:\python27\lib\site-packages\pyinstaller\building\imphook.py", line 305, in update_dependencies self._process_hiddenimports(mod_graph) file "c:\python27\lib\site-packages\pyinstaller\building\imphook.py", line 216, in _process_hiddenimports self._process_one_hiddenimport(item, mod_graph) file "c:\python27\lib\site-packages\pyinstaller\building\imphook.py", line 224, in _process_one_hiddenimport mod_graph.import_hook(item, caller=caller) file "c:\python27\lib\site-packages\pyinstaller\lib\modulegraph\modulegraph.py", line 901, in import_hook m = self._load_tail(q, tail) file "c:\python27\lib\site-packages\pyinstaller\lib\modulegraph\modulegraph.py", line 1006, in _load_tail result = self._safe_import_module(head, mname, result) file "c:\python27\lib\site-packages\pyinstaller\depend\analysis.py", line 209, in _safe_import_module module_basename, module_name, parent_package) file "c:\python27\lib\site-packages\pyinstaller\lib\modulegraph\modulegraph.py", line 1205, in _safe_import_module module_name, file_handle, pathname, metadata) file "c:\python27\lib\site-packages\pyinstaller\lib\modulegraph\modulegraph.py", line 1249, in _load_module co = compile(contents, pathname, 'exec', ast.pycf_only_ast, true) typeerror: compile() expected string without null bytes
Comments
Post a Comment