thonny / thonny

Python IDE for beginners
https://thonny.org
MIT License
3.14k stars 1.03k forks source link

TkInter TclError when debugging generators #152

Open aivarannamaa opened 8 years ago

aivarannamaa commented 8 years ago

Original report by Lee Cannon (Bitbucket: lcannon GitHub: lcannon ).


When stepping through the execution of the function next upon a generator (using F7) a TkInter TclError occurs on the second and every subsequent next operation but not on the first usage of next on the generator.

After closing the trackback the code can be continued to be stepped through but the next time the generator is called the same trackback will appear.

For example in the following code the 2nd through 10th time through the for loop the error will occur. But only while stepping through the code normal execution proceeds with no error.

def gen():
    a = 0
    while True:
        yield a

g = gen()
for i in range(10):
        print(next(g))

Attached is the trackback given when stepping through the above code.

The issue is not confined to generators as simple as this but has occurred with every generator I have tested.

aivarannamaa commented 7 years ago

Removing version: 2.0 (automated comment)

aivarannamaa commented 7 years ago

Original comment by Lee Cannon (Bitbucket: lcannon GitHub: lcannon ).


I've just confirmed this bug is still active with version 2.1.0b6

aivarannamaa commented 7 years ago

Original changes by Aivar Annamaa (Bitbucket: aivarannamaa GitHub: aivarannamaa ).


p4l1ly commented 5 years ago

I confirm that the bug is still active in 3.1.2 (on windows). I wonder why a new window does not pop up for a generator, the same way as it does for a function. Maybe that's the reason of the failure?

aivarannamaa commented 5 years ago

Still present in 3.1 (stepping with F7)

aivarannamaa commented 5 years ago

Still present in 3.2