1

I get the error 'tuple index out of range' and am very confused what is causing this issue.

The Python code runs fine, and I am only getting an error compiling it in PyInstaller.

Screenshot

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Milleon
  • 35
  • 6
  • @MiguelMLR9 your answer in a different post helped solve this issue https://stackoverflow.com/a/70059771/17575122 However, my application file opens and does not run as expected. – Milleon Jan 05 '22 at 04:36
  • Please provide enough code so others can better understand or reproduce the problem. – Community Jan 12 '22 at 09:52
  • Please review *[Why not upload images of code/errors when asking a question?](https://meta.stackoverflow.com/questions/285551/)* (e.g., *"Images should only be used to illustrate problems that* ***can't be made clear in any other way,*** *such as to provide screenshots of a user interface."*) and [do the right thing](https://stackoverflow.com/posts/70587390/edit). Thanks in advance. – Peter Mortensen Mar 26 '23 at 11:20

2 Answers2

1

It was solved using these two other answers:

How can I create a single executable file in Windows 10 with Scrapy and PyInstaller?

Scrapy PyInstaller OSError: could not get source code / twisted.internet.defer._DefGen_Return

The issue seems to happen only for the Python 3.10 version.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Milleon
  • 35
  • 6
0

I faced the same issue recently and solved it by upgrading Python to version 3.10.2.

This issue is fixed in Python version 3.10.1 and later.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Gangula
  • 5,193
  • 4
  • 30
  • 59