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

Latest version crashing on input call. #373

Closed
d3rpp opened this issue Aug 17, 2020 · 1 comment
Closed

Latest version crashing on input call. #373

d3rpp opened this issue Aug 17, 2020 · 1 comment

Comments

@d3rpp
Copy link

d3rpp commented Aug 17, 2020

Environment data

  • VS Code version: 1.48
  • Extension version (available under the Extensions sidebar): 2020.8.101
  • OS and version: Pop!OS (GNOME version: 3.36.3, Windowing System: X11)
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): dark +
  • Relevant/affected Python packages and their versions: N/A
  • Relevant/affected Python-related VS Code extensions and their versions: N/A
  • Value of the python.languageServer setting: Microsoft

[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]

The above made it worse

Expected behaviour

the function takes the input from the question variable and converts it into an integer.
then returns it

Actual behaviour

Program gets to line with input call and freezes

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Run the following code
# clear(False) -> Clears the terminal using the clear and cls for everything but windows and windows respectively. 
# proven to work  without issue

def getIntegerInput(question:str) -> int:
    while True:
        try:
            clear(False)

            tmp = int(input(question))
            if tmp == "":
                return 0
            return tmp
        except ValueError:
            print("Sorry, but that is not a number. please use the digits (0 - 9)")
            continue
print(getIntegerInput("Give me a number: "))

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

N/A, there is nothing there. it freezes.
however, when I force quit the process it says

timeout after 1000ms

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Aug 18, 2020
@int19h
Copy link
Contributor

int19h commented Aug 18, 2020

Duplicate of #370

@int19h int19h marked this as a duplicate of #370 Aug 18, 2020
@int19h int19h closed this as completed Aug 18, 2020
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

2 participants