Coder Social home page Coder Social logo

Comments (2)

terryjreedy avatar terryjreedy commented on July 17, 2024 1

I had to reformat your post to link to the image, but:

  1. The code shown in the image is different from the code shown in the text, with the addition of '.strip().
  2. That addition does not matter, as both value error lines show the input as being '', regardless of what image shows above the image of the traceback.
  3. for that input, the error is correct.

On Windows with 3.13.0a6:

>>> value = int(input())
4
>>> value
4
>>> value = int(input())

Traceback (most recent call last):
  File "<pyshell#4>", line 1, in <module>
    value = int(input())
ValueError: invalid literal for int() with base 10: ''

I got the above interactively with both IDLE and interactive Python. I also made file with

value = int(input('1>'))
print(value)
value = int(input('2>'))

with result

1>4
4
2>
Traceback (most recent call last):
  File "F:\dev\tem\tem3.py", line 3, in <module>
    value = int(input('2>'))
ValueError: invalid literal for int() with base 10: ''

Note that different prompts make it clear what was entered in response to each input() request.

There is no demonstrated reproducible bug on current Python. Whatever happens with the foreign IDE is beyond our control. You need to show an error running standard Python in Command Prompt with distinct prompts as above.

from cpython.

Eclips4 avatar Eclips4 commented on July 17, 2024

Hello! This repository is intended as CPython bug tracker.
Ask for help here, please: https://discuss.python.org/c/users/7

from cpython.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.