mirror of
https://github.com/brentvollebregt/auto-py-to-exe.git
synced 2026-04-26 04:05:49 +03:00
[GH-ISSUE #172] Error during packaging when arguments are manually provided #157
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kaankaval on GitHub (May 12, 2021).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/172
I'm getting error while trying to add Manual Argumant Inputs
OUTPUT:
Running auto-py-to-exe v2.9.0
Building directory: C:\Users\KAAN\AppData\Local\Temp\tmpj3fo6bxs
Provided command: pyinstaller --noconfirm --onedir --windowed --add-data "C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/videos;videos/" --add-data "C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/mylib;mylib/" --add-data "C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/mobilenet_ssd;mobilenet_ssd/" --input C:/Users/KAAN/Desktop/EXE/videos/example_01.mp4 "C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/Run.py"
Recursion Limit is set to 5000
Executing: pyinstaller --noconfirm --onedir --windowed --add-data C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/videos;videos/ --add-data C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/mylib;mylib/ --add-data C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/mobilenet_ssd;mobilenet_ssd/ --input C:/Users/KAAN/Desktop/EXE/videos/example_01.mp4 C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/Run.py --distpath C:\Users\KAAN\AppData\Local\Temp\tmpj3fo6bxs\application --workpath C:\Users\KAAN\AppData\Local\Temp\tmpj3fo6bxs\build --specpath C:\Users\KAAN\AppData\Local\Temp\tmpj3fo6bxs
An error occurred while packaging
Traceback (most recent call last):
File "d:\anaconda3\envs\webscrape\lib\site-packages\auto_py_to_exe\packaging.py", line 131, in package
run_pyinstaller()
File "d:\anaconda3\envs\webscrape\lib\site-packages\PyInstaller_main_.py", line 96, in run
args = parser.parse_args(pyi_args)
File "d:\anaconda3\envs\webscrape\lib\argparse.py", line 1737, in parse_args
self.error(msg % ' '.join(argv))
File "d:\anaconda3\envs\webscrape\lib\argparse.py", line 2393, in error
self.exit(2, _('%(prog)s: error: %(message)s\n') % args)
File "d:\anaconda3\envs\webscrape\lib\argparse.py", line 2380, in exit
_sys.exit(status)
SystemExit: 2
Project output will not be moved to output folder
Complete.
@brentvollebregt commented on GitHub (May 13, 2021):
With it failing in
argparse.py, I am guessing it is an argument parsing error.I see you are using
--input VAL, which is not a PyInstaller option as far as I am aware.@kaankaval commented on GitHub (May 14, 2021):
I'm getting this OUTPUT without --input VAL:
Running auto-py-to-exe v2.9.0
Building directory: C:\Users\KAAN\AppData\Local\Temp\tmpestwbuu3
Provided command: pyinstaller --noconfirm --onedir --windowed --add-data "C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/mylib;mylib/" --add-data "C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/mobilenet_ssd;mobilenet_ssd/" --add-data "C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/videos;videos/" --prototxt mobilenet_ssd/MobileNetSSD_deploy.prototxt --model mobilenet_ssd/MobileNetSSD_deploy.caffemodel "C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/Run.py"
Recursion Limit is set to 5000
Executing: pyinstaller --noconfirm --onedir --windowed --add-data C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/mylib;mylib/ --add-data C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/mobilenet_ssd;mobilenet_ssd/ --add-data C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/videos;videos/ --prototxt mobilenet_ssd/MobileNetSSD_deploy.prototxt --model mobilenet_ssd/MobileNetSSD_deploy.caffemodel C:/Users/KAAN/Desktop/People-Counting-in-Real-Time-master/Run.py --distpath C:\Users\KAAN\AppData\Local\Temp\tmpestwbuu3\application --workpath C:\Users\KAAN\AppData\Local\Temp\tmpestwbuu3\build --specpath C:\Users\KAAN\AppData\Local\Temp\tmpestwbuu3
An error occurred while packaging
Traceback (most recent call last):
File "d:\anaconda3\envs\webscrape\lib\site-packages\auto_py_to_exe\packaging.py", line 131, in package
run_pyinstaller()
File "d:\anaconda3\envs\webscrape\lib\site-packages\PyInstaller_main_.py", line 96, in run
args = parser.parse_args(pyi_args)
File "d:\anaconda3\envs\webscrape\lib\argparse.py", line 1737, in parse_args
self.error(msg % ' '.join(argv))
File "d:\anaconda3\envs\webscrape\lib\argparse.py", line 2393, in error
self.exit(2, _('%(prog)s: error: %(message)s\n') % args)
File "d:\anaconda3\envs\webscrape\lib\argparse.py", line 2380, in exit
_sys.exit(status)
SystemExit: 2
Project output will not be moved to output folder
Complete.
@brentvollebregt commented on GitHub (May 14, 2021):
Again, I see you're using
--prototxt VALand--model VALwhich are neither PyInstaller options as far as I am aware.Please only add PyInstaller options here.
@kaankaval commented on GitHub (May 15, 2021):
I got it now. I have to add this script options some where. Can you help me about it ? This is project https://github.com/saimj7/People-Counting-in-Real-Time that I have to make it executable. Thanks for your patience.
@brentvollebregt commented on GitHub (May 15, 2021):
The input you are using is an escape hatch for situations where the tool cannot provide all the options you want during the packaging process.
Why are you providing them when packaging? Potentially these arguments you are adding should be provided at runtime?
@kaankaval commented on GitHub (May 15, 2021):
I don't know but i searched more project about people counting. They were same runtime inputs that you have to indicate these options. Maybe i should try another ways like config file or insert to script.
@brentvollebregt commented on GitHub (May 15, 2021):
I feel like you should be passing those arguments when running the executable. I imagine you provide them when you run your Python script - the exe will be the same.
@knguyen1401 commented on GitHub (May 15, 2021):
Help me with this pls:
Traceback (most recent call last):
File "D:\auto-py-to-exe-2.8.0\auto_py_to_exe\packaging.py", line 131, in package
run_pyinstaller()
File "C:\Users\knguy.DESKTOP-HK64HD9\AppData\Roaming\Python\Python39\site-packages\PyInstaller_main_.py", line 114, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Users\knguy.DESKTOP-HK64HD9\AppData\Roaming\Python\Python39\site-packages\PyInstaller_main_.py", line 65, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Users\knguy.DESKTOP-HK64HD9\AppData\Roaming\Python\Python39\site-packages\PyInstaller\building\build_main.py", line 737, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "C:\Users\knguy.DESKTOP-HK64HD9\AppData\Roaming\Python\Python39\site-packages\PyInstaller\building\build_main.py", line 684, in build
exec(code, spec_namespace)
File "C:\Users\KNGUY~1.DES\AppData\Local\Temp\tmpmzcdc1wm\SCP-106.spec", line 21, in
exe = EXE(pyz,
File "C:\Users\knguy.DESKTOP-HK64HD9\AppData\Roaming\Python\Python39\site-packages\PyInstaller\building\api.py", line 450, in init
self.postinit()
File "C:\Users\knguy.DESKTOP-HK64HD9\AppData\Roaming\Python\Python39\site-packages\PyInstaller\building\datastruct.py", line 160, in postinit
self.assemble()
File "C:\Users\knguy.DESKTOP-HK64HD9\AppData\Roaming\Python\Python39\site-packages\PyInstaller\building\api.py", line 549, in assemble
icon.CopyIcons(tmpnm, self.icon)
File "C:\Users\knguy.DESKTOP-HK64HD9\AppData\Roaming\Python\Python39\site-packages\PyInstaller\utils\win32\icon.py", line 216, in CopyIcons
return CopyIcons_FromIco(dstpath, [srcpath])
File "C:\Users\knguy.DESKTOP-HK64HD9\AppData\Roaming\Python\Python39\site-packages\PyInstaller\utils\win32\icon.py", line 153, in CopyIcons_FromIco
for i, f in enumerate(icons):
File "C:\Users\knguy.DESKTOP-HK64HD9\AppData\Roaming\Python\Python39\site-packages\PyInstaller\utils\win32\icon.py", line 117, in init
entry.fromfile(file)
File "C:\Users\knguy.DESKTOP-HK64HD9\AppData\Roaming\Python\Python39\site-packages\PyInstaller\utils\win32\icon.py", line 76, in fromfile
self.fields = list(struct.unpack(self.format, data))
struct.error: unpack requires a buffer of 16 bytes
@brentvollebregt commented on GitHub (May 15, 2021):
@knguyen1401 is your error related to the original issue here? It definitely looks different.
Could you please create a new issue if you want to raise a bug. Also remember these are GitHub issues, not a place to tell people to help you.
@knguyen1401 commented on GitHub (May 16, 2021):
@brentvollebregt Well, I try to put the icon to the app and get the error. If I don't put the icon, I won't receive that error anymore. I'll try Process Hacker to change the icon
@knguyen1401 commented on GitHub (May 16, 2021):
I think it is a memory issue idk
@brentvollebregt commented on GitHub (May 16, 2021):
@knguyen1401 create a new issue for your problem.
It is not related to the issue in this ticket.
@knguyen1401 commented on GitHub (May 16, 2021):
I solved it. My icon file is invaild so I got the problem
@github-actions[bot] commented on GitHub (Jul 16, 2021):
This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.
@github-actions[bot] commented on GitHub (Jul 21, 2021):
Closing issue due to no activity in more than 60 days.