Reputation: 21
Trying to convert one of my python files to an EXE for my friends to use with me.
IT worked earlier today. Changed nothing of substance and now im recieving the following error:
278151 ERROR: An error occurred while packaging
Traceback (most recent call last):
File "C:\Users\lewy1\AppData\Roaming\Python\Python38\site-packages\auto_py_to_exe\packaging.py", line 131, in package
run_pyinstaller()
File "C:\Users\lewy1\AppData\Roaming\Python\Python38\site-packages\PyInstaller\__main__.py", line 114, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Users\lewy1\AppData\Roaming\Python\Python38\site-packages\PyInstaller\__main__.py", line 65, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Users\lewy1\AppData\Roaming\Python\Python38\site-packages\PyInstaller\building\build_main.py", line 720, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "C:\Users\lewy1\AppData\Roaming\Python\Python38\site-packages\PyInstaller\building\build_main.py", line 667, in build
exec(code, spec_namespace)
File "C:\Users\lewy1\AppData\Local\Temp\tmpupp0c450\ProjectEXE.spec", line 20, in <module>
exe = EXE(pyz,
File "C:\Users\lewy1\AppData\Roaming\Python\Python38\site-packages\PyInstaller\building\api.py", line 446, in __init__
self.__postinit__()
File "C:\Users\lewy1\AppData\Roaming\Python\Python38\site-packages\PyInstaller\building\datastruct.py", line 160, in __postinit__
self.assemble()
File "C:\Users\lewy1\AppData\Roaming\Python\Python38\site-packages\PyInstaller\building\api.py", line 622, in assemble
with open(exe, 'rb') as infh:
OSError: [Errno 22] Invalid argument: 'C:\\Users\\lewy1\\AppData\\Local\\Temp\\tmpupp0c450\\build\\ProjectEXE\\run.exe.db9ln703'
I noticed that when this error occurs windows defende pops up informing me 'Trojan :Win32/Wacatac.D3!ml' I've never noticed this whilst using pyinstaller previously.
so my question is, does anyone know of any fixes for this issue?
Edit: I have just selected onedir instead of onefile and it has worked. Hoping maybe this could help in the solving of the issue
Upvotes: 1
Views: 2147
Reputation: 21
Thanks to Carlo's comment, it seemed to be evident that it was an antivirus issue. So disabling my antivirus whilst the exe was building did the trick!
Upvotes: 1