[GH-ISSUE #172] Error during packaging when arguments are manually provided #157

Closed
opened 2026-02-26 12:20:40 +03:00 by kerem · 15 comments
Owner

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.

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.
kerem 2026-02-26 12:20:40 +03:00
  • closed this issue
  • added the
    Stale
    label
Author
Owner

@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.

<!-- gh-comment-id:840359270 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:841276670 --> @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.
Author
Owner

@brentvollebregt commented on GitHub (May 14, 2021):

Again, I see you're using --prototxt VAL and --model VAL which are neither PyInstaller options as far as I am aware.

Please only add PyInstaller options here.

<!-- gh-comment-id:841559051 --> @brentvollebregt commented on GitHub (May 14, 2021): Again, I see you're using `--prototxt VAL` and `--model VAL` which are neither [PyInstaller options](https://pyinstaller.readthedocs.io/en/stable/usage.html) as far as I am aware. Please only add PyInstaller options here.
Author
Owner

@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.

<!-- gh-comment-id:841616820 --> @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.
Author
Owner

@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?

<!-- gh-comment-id:841619253 --> @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?
Author
Owner

@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.

<!-- gh-comment-id:841621009 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:841627301 --> @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.
Author
Owner

@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

<!-- gh-comment-id:841653531 --> @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 <module> 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
Author
Owner

@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.

<!-- gh-comment-id:841739842 --> @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.
Author
Owner

@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

<!-- gh-comment-id:841757455 --> @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
Author
Owner

@knguyen1401 commented on GitHub (May 16, 2021):

I think it is a memory issue idk

<!-- gh-comment-id:841762408 --> @knguyen1401 commented on GitHub (May 16, 2021): I think it is a memory issue idk
Author
Owner

@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.

<!-- gh-comment-id:841765280 --> @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.
Author
Owner

@knguyen1401 commented on GitHub (May 16, 2021):

I solved it. My icon file is invaild so I got the problem

<!-- gh-comment-id:841781674 --> @knguyen1401 commented on GitHub (May 16, 2021): I solved it. My icon file is invaild so I got the problem
Author
Owner

@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.

<!-- gh-comment-id:881096968 --> @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.
Author
Owner

@github-actions[bot] commented on GitHub (Jul 21, 2021):

Closing issue due to no activity in more than 60 days.

<!-- gh-comment-id:883799951 --> @github-actions[bot] commented on GitHub (Jul 21, 2021): Closing issue due to no activity in more than 60 days.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#157
No description provided.