IndexError: tuple index out of range when I try to create an executable from a python script using auto-py-to-exe
This is a Python 3.10 issue.
To fix it:
You have to go to the folder "Python310\Lib" and edit the file 'dis.py'.
In the 'dis.py' file you have to find this "def _unpack_opargs" and inside the else statement write a new line with this: "extended_arg = 0", then save the file.
I did something like that:
else:
arg = None
extended_arg = 0
yield (i, op, arg)
and everything is working fine now.
I found the solution here:
https://bugs.python.org/issue45757
https://github.com/pyinstaller/pyinstaller/issues/6301
Error tuple index out of range for matrix preprocess
input2
has shape (3,)
. Try to reshape it before function call:
input2 = input2.reshape(1,-1)
or otherwise add some check code at the very start of the function body:
def updated_x (input_x):
if len(input_x.shape)<2:
input_x = input_x.reshape(1,-1)
#..........
#..........
Related Topics
Difference Between Two Dates in Python
Zip Variable Empty After First Use
Why Are Empty Strings Returned in Split() Results
Label Python Data Points on Plot
Draw a Transparent Rectangles and Polygons in Pygame
Making a Request to a Restful API Using Python
Python Socket Receive Large Amount of Data
Windows Is Not Passing Command Line Arguments to Python Programs Executed from the Shell
Any Way to Modify Locals Dictionary
List to Dictionary Conversion with Multiple Values Per Key
What Is the Quickest Way to Http Get in Python
Extracting Date from a String in Python