Python Forum
EOF error while taking input
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
EOF error while taking input
#1
Hey there!
I had been using Eclipse IDE for python for some time now but switched to Visual Studio Code with Python extension. Just to give the IDE a test run, I ran the following code:

name = input("Please enter your name: ")
print("Hello " + name + "!")
I'm pretty sure that this would run normally in Eclipse but in Visual Studio and other IDEs, it has been giving me an EOF error. I tried replacing "input" with "raw_input" (because I read that it might help), but then I get an error saying "raw_input" isn't defined.
Please help me out with this.
Thanks!
Reply
#2
Do you have a return character at the end of line 2?
Can you post the exact error? I just copied and pasted your code into VSC and it ran fine.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pyspark SQL Error - mismatched input 'FROM' expecting <EOF> Ariean 3 136 Nov-20-2020, 03:49 PM
Last Post: Ariean
  Input Error Dream 2 431 Jul-12-2020, 05:41 PM
Last Post: bowlofred
  taking input doesnt print as list bntayfur 2 365 Jun-04-2020, 02:48 AM
Last Post: bntayfur
  Getting an error while using input function dcsethia 5 434 May-11-2020, 04:59 PM
Last Post: buran
  Taking Multiple Command Line Argument Input bwdu 6 638 Mar-29-2020, 05:52 PM
Last Post: buran
  catch input type error mcmxl22 5 751 Aug-11-2019, 07:33 AM
Last Post: wavic
  A question about subprocess taking input from command line and returning output! Aurimas 8 1,417 May-15-2019, 04:02 PM
Last Post: Aurimas
  Occasional error when taking an item off a queue Wiggy 1 665 Jan-19-2019, 11:22 PM
Last Post: Gribouillis
  inserting input gives me error message RubberNuggets 3 705 Jan-15-2019, 06:17 PM
Last Post: buran
  an input error or elif error , how can i fix this the_fire_pharaoh 1 805 Dec-15-2018, 09:47 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020