Auto Py to Exe is not working.
superpip0
Posted messages
4
Status
Member
-
Spirali -
Spirali -
Hello,
I am trying to convert a py file to exe with auto py to exe but the software returns an error. Do you know why? Thank you in advance for your reply.
<config>Windows / Firefox 88.0</config>
>
I am trying to convert a py file to exe with auto py to exe but the software returns an error. Do you know why? Thank you in advance for your reply.
Running auto-py-to-exe v2.9.0
Building directory: C:\Users\super\AppData\Local\Temp\tmp4jk4c49g
Provided command: pyinstaller --noconfirm --onefile --console "C:/Users/super/OneDrive/Bureau/test.py"
Recursion Limit is set to 5000
Executing: pyinstaller --noconfirm --onefile --console C:/Users/super/OneDrive/Bureau/test.py --distpath C:\Users\super\AppData\Local\Temp\tmp4jk4c49g\application --workpath C:\Users\super\AppData\Local\Temp\tmp4jk4c49g\build --specpath C:\Users\super\AppData\Local\Temp\tmp4jk4c49g
18699 INFO: PyInstaller: 4.2
18714 INFO: Python: 3.8.10
18735 INFO: Platform: Windows-10-10.0.19042-SP0
18745 INFO: wrote C:\Users\super\AppData\Local\Temp\tmp4jk4c49g\test.spec
18762 INFO: UPX is not available.
18783 INFO: Extending PYTHONPATH with paths
['C:\\Users\\super\\OneDrive\\Bureau',
'C:\\Users\\super\\AppData\\Local\\Temp\\tmp4jk4c49g']
18820 INFO: checking Analysis
18824 INFO: Building Analysis because Analysis-00.toc is non existent
18839 INFO: Initializing module dependency graph...
18842 INFO: Caching module graph hooks...
18862 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
18873 INFO: Analyzing base_library.zip ...
20588 INFO: Processing pre-find module path hook distutils from 'C:\\Users\\super\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python38\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
20596 INFO: distutils: retargeting to non-venv dir 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\\lib'
21596 INFO: Caching module dependency graph...
21668 INFO: running Analysis Analysis-00.toc
An error occurred while packaging
Traceback (most recent call last):
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\win32ctypes\pywin32\pywintypes.py", line 35, in pywin32error
yield
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\win32ctypes\pywin32\win32api.py", line 43, in LoadLibraryEx
return _dll._LoadLibraryEx(fileName, 0, flags)
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\win32ctypes\core\cffi\_dll.py", line 23, in _LoadLibraryEx
result = check_null(
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\win32ctypes\core\cffi\_util.py", line 81, in __call__
self._raise_error(function_name)
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\win32ctypes\core\cffi\_util.py", line 92, in _raise_error
raise exception
OSError: [WinError 1920] The system cannot access the file
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\auto_py_to_exe\packaging.py", line 131, in package
run_pyinstaller()
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\__main__.py", line 114, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\__main__.py", line 65, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\building\build_main.py", line 725, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\building\build_main.py", line 672, in build
exec(code, spec, namespace)
File "C:\Users\super\AppData\Local\Temp\tmp4jk4c49g\test.spec", line 6, in <module>
a = Analysis(['C:/Users/super/OneDrive/Bureau/test.py'],
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\building\build_main.py", line 242, in __init__
self.__postinit__()
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\building\datastruct.py", line 160, in __postinit__
self.assemble()
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\building\build_main.py", line 391, in assemble
self.binaries.extend(bindepend.Dependencies([('', python, '')],
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\depend\bindepend.py", line 224, in Dependencies
for ftocnm, fn in getAssemblyFiles(pth, manifest, redirects):
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\depend\bindepend.py", line 403, in getAssemblyFiles
for assembly in getAssemblies(pth):
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\depend\bindepend.py", line 354, in getAssemblies
res = GetManifestResources(pth)
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\utils\win32\winmanifest.py", line 1016, in GetManifestResources
return winresource.GetResources(filename, [RT_MANIFEST], names, languages)
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\utils\win32\winresource.py", line 170, in GetResources
hsrc = win32api.LoadLibraryEx(filename, 0, LOAD_LIBRARY_AS_DATAFILE)
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\win32ctypes\pywin32\win32api.py", line 43, in LoadLibraryEx
return _dll._LoadLibraryEx(fileName, 0, flags)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\win32ctypes\pywin32\pywintypes.py", line 37, in pywin32error
raise error(exception.winerror, exception.function, exception.strerror)
win32ctypes.pywin32.pywintypes.error: (1920, 'LoadLibraryEx', 'The system cannot access the file')
Project output will not be moved to output folder
<config>Windows / Firefox 88.0</config>
1 answer
Good evening.
You show us the output log, but you don't show what you put in as input, so it seems like you haven't specified the path of the Python files you're importing in your script or necessary for the functioning of your application.
Otherwise, consult the indicated page to try to identify what is wrong.
https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/?utm_source=auto_py_to_exe&utm_medium=application_link&utm_campaign=auto_py_to_exe_help&utm_content=bottom
Since I'm not on a Windows system, I won't be able to test.
Otherwise, there are other alternatives to create a Windows exe from Python sources, it seems.
You show us the output log, but you don't show what you put in as input, so it seems like you haven't specified the path of the Python files you're importing in your script or necessary for the functioning of your application.
Otherwise, consult the indicated page to try to identify what is wrong.
https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/?utm_source=auto_py_to_exe&utm_medium=application_link&utm_campaign=auto_py_to_exe_help&utm_content=bottom
Since I'm not on a Windows system, I won't be able to test.
Otherwise, there are other alternatives to create a Windows exe from Python sources, it seems.