bugfix> python > 投稿

私は ValueError: source code string cannot contain null bytes コマンド実行時 pyinstaller main.py 管理者権限の有無にかかわらず、cmdで。

Traceback (most recent call last):
  File "c:\users\User\appdata\local\programs\python\python38\lib\runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\User\appdata\local\programs\python\python38\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\User\AppData\Local\Programs\Python\Python38\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
  File "c:\users\User\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\__main__.py", line 114, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "c:\users\User\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "c:\users\User\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\build_main.py", line 734, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "c:\users\User\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\build_main.py", line 681, in build
    exec(code, spec_namespace)
  File "C:\Users\User\OneDrive\Pulpit\CODE\Python 3\PyGame Games\Game Of Pong\main.spec", line 30, in <module>
    coll = COLLECT(exe,
  File "c:\users\User\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\api.py", line 698, in __init__
    self.__postinit__()
  File "c:\users\User\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\datastruct.py", line 160, in __postinit__
    self.assemble()
  File "c:\users\User\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\api.py", line 732, in assemble
    fnm = checkCache(fnm, strip=self.strip_binaries,
  File "c:\users\User\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\utils.py", line 197, in checkCache
    cache_index = load_py_data_struct(cacheindexfn)
  File "c:\users\User\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\utils\misc.py", line 233, in load_py_data_struct
    return eval(f.read())
ValueError: source code string cannot contain null bytes

Notepad ++を使用してコードからNULL文字を削除しようとしましたが、pyinstallerを再インストールしようとしましたが、それでも問題は解決しません。