'When I was trying to turn the project that I'm working on from .py to .exe, my console popped up a error before the transformation was finished

When I was trying to turn the project that I'm working on from .py to .exe, my console popped up a error before the transformation was finished, and the .exe that it created is not executable. I tryed not doing --onefile or -w first, but that didn't work. The error info is down below.

plz help!!!!!!!!!!!!

ERROR INFO:

Traceback (most recent call last):
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\site-packages\win32ctypes\pywin32\pywintypes.py", line 35, in pywin32error
    yield
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\site-packages\win32ctypes\pywin32\win32api.py", line 229, in EndUpdateResource
    _resource._EndUpdateResource(handle, discard)
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\site-packages\win32ctypes\core\ctypes\_util.py", line 64, in check_false
    raise make_error(function, function_name)
OSError: [WinError 110] The system cannot open the device or file specified.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\__main__.py", line 124, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\__main__.py", line 58, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 793, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 725, in build
    exec(code, spec_namespace)
  File "C:\Users\flyin\Music\i\Malware.spec", line 23, in <module>
    exe = EXE(pyz,
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\api.py", line 508, in __init__
    self.__postinit__()
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\datastruct.py", line 155, in __postinit__
    self.assemble()
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\api.py", line 670, in assemble
    self.manifest.update_resources(self.name, [1])
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\utils\win32\winmanifest.py", line 904, in update_resources
    UpdateManifestResourcesFromXML(dstpath, self.toprettyxml().encode("UTF-8"), names, languages)
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\utils\win32\winmanifest.py", line 992, in UpdateManifestResourcesFromXML
    winresource.UpdateResources(dstpath, xmlstr, RT_MANIFEST, names or [name], languages or [0, "*"])
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\utils\win32\winresource.py", line 189, in UpdateResources
    win32api.EndUpdateResource(hdst, 0)
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\site-packages\win32ctypes\pywin32\win32api.py", line 228, in EndUpdateResource
    with _pywin32error():
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "C:\Users\flyin\AppData\Local\Programs\Python\Python310\lib\site-packages\win32ctypes\pywin32\pywintypes.py", line 37, in pywin32error
    raise error(exception.winerror, exception.function, exception.strerror)
win32ctypes.pywin32.pywintypes.error: (110, 'EndUpdateResourceW', 'The system cannot open the device or file specified.')


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source