Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: tuple index out of range (Python 3.10) #215

Closed
brentvollebregt opened this issue Nov 16, 2021 · 13 comments
Closed

IndexError: tuple index out of range (Python 3.10) #215

brentvollebregt opened this issue Nov 16, 2021 · 13 comments

Comments

@brentvollebregt
Copy link
Owner

Recently PyInstaller 4.6 was released which added support for Python 3.10. As of auto-py-to-exe v2.11.0, PyInstaller 4.6 is a requirement.

It has been noted that PyInstaller 4.6 does not fully support Python 3.10 due to a bug in CPython. The PyInstaller discussion related to this issue can be found here and the associated CPython bug can be found here.

This bug cannot be fixed in auto-py-to-exe or PyInstaller so we must wait for a new Python 3.10.x release with a fix.

@Barak911
Copy link

I found a solution to this problem.
This is a python 3.10 bug, and after applying the fix everything related to pyinstaller started working properly.

"
so basically 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".

I did something like that:

    else:
        arg = None
        extended_arg = 0 
    yield (i, op, arg)

and everything is working fine now.
"
pyinstaller/pyinstaller#6301 (comment)

@ghost
Copy link

ghost commented Dec 22, 2021

extended_arg = 0

TSYM Worked perfectly!!

@brentvollebregt
Copy link
Owner Author

Python 3.10.1 fixes this now and I have added a warning to auto-py-to-exe in 2.14.0. Closing as this is no longer an issue regarding Python 3.10.1 is not used.

@4ggm
Copy link

4ggm commented Jan 22, 2022

pls help

@brentvollebregt brentvollebregt unpinned this issue Mar 15, 2022
@bobbob8113
Copy link

yo

@bobbob8113
Copy link

i can't find so basically 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".

@brentvollebregt
Copy link
Owner Author

@bobbob8113 I recommend upgrading to Python 3.10.1 or above if you have the option to

@bobbob8113
Copy link

I have python 3.10.4 and it still give the same errors

@brentvollebregt
Copy link
Owner Author

@bobbob8113 you may have Python 3.10.4, but are you 100% sure it's being used? Did you previously (or still do) have Python 3.10.0 installed?

@bobbob8113
Copy link

Ye previsously but i update alrdy and using anaconda

@brentvollebregt
Copy link
Owner Author

@bobbob8113 are there any warnings at the top of auto-py-to-exe? Maybe something that says "You are using Python 3.10.0. This version of Python has a bug that causes PyInstaller to fail."?

@lloydyu24
Copy link

Why am I still getting the "You are using Python 3.10.0. This version of Python has a bug that causes PyInstaller to fail.
Please upgrade to Python 3.10.1 or above." message after updating my Python to the latest Python 3.10.4?

@brentvollebregt
Copy link
Owner Author

@lloydyu24 the line that controls that message is here - the only way you can get the message is if you are running Python 3.10.0.

Maybe you have installed another installation of Python (3.10.4) but are still running auto-py-to-exe with the previous installation (3.10.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants