This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: problem with updated 3.9.5
Type: Stage: resolved
Components: Windows Versions: Python 3.9
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: eric.smith, paul.moore, shreyanavigyan, steve.dower, swarnila707, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2021-05-09 06:37 by swarnila707, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
main.py swarnila707, 2021-05-09 06:37
Messages (7)
msg393299 - (view) Author: Swarnila Chakma (swarnila707) Date: 2021-05-09 06:37
the codes were running okay with the version 3.9.4. But yesterday after updating the new version 3.9.5, the same codes are showing error. For example, if I were to write a code about swapping numbers, i write the code:

print('Enter two variables')
a = input() #suppose 2 nilam
b = input()#suppose 3 nilam
x = int(a)
y = int(b)
x = x-y #now we stored value of x-y in x variable
y = x+y #now we stored value of x+y in y variable
x = y-x
print(x)
print(y)

And I get the following output:

File "C:/Users/Asus/PycharmProjects/celsius to fahrenheit/main.py", line 4, in <module>
    x = int(a)
ValueError: invalid literal for int() with base 10: ''

I tried reinstalling the version 3.9.4, but it's the same result. It would be appreciable if it can be solved soon.
msg393303 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-05-09 07:17
This is almost certainly not a bug in python. You're probably entering an empty string for "a".

Try it without using input(). For example, replace lines 2 and 3 with:
a = "3"
b = "4"
msg393304 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-05-09 07:19
Also: How are you executing this code? From IDLE? From the command line?
msg393307 - (view) Author: Shreyan Avigyan (shreyanavigyan) * Date: 2021-05-09 07:22
What is the input are you expecting? int can only convert string with only numbers like "10" or "2" not "10 abc" or "2 abc".
msg393316 - (view) Author: Swarnila Chakma (swarnila707) Date: 2021-05-09 11:16
I'm executing the code by the software PycharmEdu from jetbrains.
I'm actually facing the problem, no matter what input I give in my console, it's automatically just printing empty strings. 

How can I solve this?
msg393317 - (view) Author: Shreyan Avigyan (shreyanavigyan) * Date: 2021-05-09 11:17
What is the input you're giving?
msg393318 - (view) Author: Swarnila Chakma (swarnila707) Date: 2021-05-09 11:24
Okay actually I managed to solve it. Thanks to both of you for helping me out.
History
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88249
2021-05-09 11:44:12eric.smithsetstatus: open -> closed
resolution: not a bug
stage: resolved
2021-05-09 11:24:18swarnila707setmessages: + msg393318
2021-05-09 11:17:25shreyanavigyansetmessages: + msg393317
2021-05-09 11:16:36swarnila707setmessages: + msg393316
2021-05-09 07:22:44shreyanavigyansetnosy: + shreyanavigyan
messages: + msg393307
2021-05-09 07:19:02eric.smithsetstatus: pending -> open

messages: + msg393304
2021-05-09 07:17:15eric.smithsetstatus: open -> pending
nosy: + eric.smith
messages: + msg393303

2021-05-09 06:37:06swarnila707create