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

QtConsole Freeze and Error After calling input() "QTextCursor::setPosition: out of range" #610

Open
TheMatt2 opened this issue Jun 11, 2024 · 0 comments

Comments

@TheMatt2
Copy link
Contributor

TheMatt2 commented Jun 11, 2024

Issue with QtConsole freezing when using input() to prompt the user for input after printing something asynchronously from a second thread.

It seems to be important that the prompt given to input() is a blank string.

The following code fragment can replicate the issue.

import time, threading

def f():
    time.sleep(2)
    print("Hello")

threading.Thread(target = f).start(); x = input()

When you run the code, you do not get a prompt back, and the console QtConsole was launched from logs the message QTextCursor::setPosition: Position '429' out of range

Jupyter QtConsole 5.6.0.dev0

Tested against commit version: 56e5a5e

image

Originally posted by @TheMatt2 in #607 (comment)

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

1 participant