[GH-ISSUE #213] IndexError: tuple index out of range -- python 3.10 #193

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

Originally created by @mkasaii16 on GitHub (Nov 15, 2021).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/213

G:\Programing\python project*>auto-py-to-exe
1353918 ERROR: An error occurred while packaging
Traceback (most recent call last):
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\auto_py_to_exe\packaging.py", line 131, in package
run_pyinstaller()
File "C:\Users*\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*
\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*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 818, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 750, in build
exec(code, spec_namespace)
File "C:\Users*
\AppData\Local\Temp\tmpflcbxrwa\owel3.spec", line 7, in
a = Analysis(
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 302, in init
self.postinit()
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\datastruct.py", line 155, in postinit
self.assemble()
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 464, in assemble
priority_scripts.append(self.graph.add_script(script))
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 265, in add_script
self._top_script_node = super().add_script(pathname)
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1433, in add_script
self._process_imports(n)
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
target_module = self._safe_import_hook(*import_info, kwargs)[0]
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
target_modules = self.import_hook(
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1505, in import_hook
target_package, target_module_partname = self._find_head_package(
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1684, in _find_head_package
target_package = self._safe_import_module(
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
return super()._safe_import_module(module_basename, module_name, parent_package)
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
self._process_imports(n)
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
target_module = self._safe_import_hook(*import_info, kwargs)[0]
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
target_modules = self.import_hook(
File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1505, in import_hook
target_package, target_module_partname = self._find_head_package(
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1684, in _find_head_package
target_package = self._safe_import_module(
File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
return super()._safe_import_module(module_basename, module_name, parent_package)
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2061, in _safe_import_module
n = self._scan_code(module, co, co_ast)
File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2645, in _scan_code
self._scan_bytecode(
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2749, in _scan_bytecode
for inst in util.iterate_instructions(module_code_object):
File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\util.py", line 147, in iterate_instructions
yield from iterate_instructions(constant)
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\util.py", line 139, in iterate_instructions
yield from get_instructions(code_object)
File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\dis.py", line 338, in _get_instructions_bytes
argval, argrepr = _get_const_info(arg, constants)
File "C:\Users*
\AppData\Local\Programs\Python\Python310\lib\dis.py", line 292, in _get_const_info
argval = const_list[const_index]
IndexError: tuple index out of range


python 3.10

Originally created by @mkasaii16 on GitHub (Nov 15, 2021). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/213 G:\Programing\python project\******>auto-py-to-exe 1353918 ERROR: An error occurred while packaging Traceback (most recent call last): File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\auto_py_to_exe\packaging.py", line 131, in package run_pyinstaller() File "C:\Users\******\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\******\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\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 818, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 750, in build exec(code, spec_namespace) File "C:\Users\******\AppData\Local\Temp\tmpflcbxrwa\owel3.spec", line 7, in <module> a = Analysis( File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 302, in __init__ self.__postinit__() File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\datastruct.py", line 155, in __postinit__ self.assemble() File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 464, in assemble priority_scripts.append(self.graph.add_script(script)) File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 265, in add_script self._top_script_node = super().add_script(pathname) File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1433, in add_script self._process_imports(n) File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports target_module = self._safe_import_hook(*import_info, **kwargs)[0] File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook target_modules = self.import_hook( File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1505, in import_hook target_package, target_module_partname = self._find_head_package( File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1684, in _find_head_package target_package = self._safe_import_module( File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module return super()._safe_import_module(module_basename, module_name, parent_package) File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module self._process_imports(n) File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports target_module = self._safe_import_hook(*import_info, **kwargs)[0] File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook target_modules = self.import_hook( File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1505, in import_hook target_package, target_module_partname = self._find_head_package( File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1684, in _find_head_package target_package = self._safe_import_module( File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module return super()._safe_import_module(module_basename, module_name, parent_package) File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2061, in _safe_import_module n = self._scan_code(module, co, co_ast) File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2645, in _scan_code self._scan_bytecode( File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2749, in _scan_bytecode for inst in util.iterate_instructions(module_code_object): File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\util.py", line 147, in iterate_instructions yield from iterate_instructions(constant) File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\util.py", line 139, in iterate_instructions yield from get_instructions(code_object) File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\dis.py", line 338, in _get_instructions_bytes argval, argrepr = _get_const_info(arg, constants) File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\dis.py", line 292, in _get_const_info argval = const_list[const_index] IndexError: tuple index out of range ----------------- python 3.10
kerem closed this issue 2026-02-26 12:20:47 +03:00
Author
Owner

@brentvollebregt commented on GitHub (Nov 15, 2021):

See this comment. This is a bug in Python.

<!-- gh-comment-id:969225447 --> @brentvollebregt commented on GitHub (Nov 15, 2021): See [this comment](https://github.com/brentvollebregt/auto-py-to-exe/issues/205#issuecomment-958462879). This is a bug in Python.
Author
Owner

@mkasaii16 commented on GitHub (Nov 15, 2021):

See this comment. This is a bug in Python.

OK I understood.
I had to use python3.9

<!-- gh-comment-id:969248909 --> @mkasaii16 commented on GitHub (Nov 15, 2021): > See [this comment](https://github.com/brentvollebregt/auto-py-to-exe/issues/205#issuecomment-958462879). This is a bug in Python. OK I understood. I had to use python3.9
Author
Owner

@brentvollebregt commented on GitHub (Nov 16, 2021):

See #215

<!-- gh-comment-id:969914625 --> @brentvollebregt commented on GitHub (Nov 16, 2021): See #215
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#193
No description provided.