Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 unexpected EOF while parsing
#1
when running this code:
import screens as scn
import inventory as inv

pressEnter = ""

scn.welcomeScreen_func()
pressEnter = input("press ENTER to continue: ")
pressEnter = 1
print(pressEnter)
I get this error:
Error:
Traceback (most recent call last): File "Main.py", line 8, in <module> pressEnter = input("press ENTER to continue: ") File "<string>", line 0 ^ SyntaxError: unexpected EOF while parsing ------------------ (program exited with code: 1) Press return to continue
I've been trying to find the issue for hours with no luck, any advice helps, thanks all
Quote
#2
Such error usually occurs if you lost closing parenthesis, e.g.
Quote:python -c "print("

Error:
File "<string>", line 1 print( ^ SyntaxError: unexpected EOF while parsing
Quote
#3
Not to address the EOF problem but code logic: why you ask for user input and then overwrite it (pressEnter)? Not to mention that pressEnter is assigned to empty string to begin with (I have no idea what scn.welcomeScreen_func() does).
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Life of Brian: Conjugate the verb, "to go" !
Quote
#4
I am pretty new to python in general, please excuse my bad practice XD
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  unexpected EOF while parsing whatloop 3 1,119 Mar-09-2019, 06:59 PM
Last Post: whatloop
  SyntaxError: unexpected EOF while parsing donmerch 2 3,119 Oct-15-2018, 05:12 AM
Last Post: wavic
  unexpected output while parsing file anna 3 804 Apr-28-2018, 05:13 PM
Last Post: anna
  Unexpected Output after Running PArsing Script hotsea 7 1,102 Jan-10-2018, 09:55 AM
Last Post: hotsea

Forum Jump:


Users browsing this thread: 1 Guest(s)