SyntaxError: unexpected EOF while parsing (<none>, line 1)

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Mark9870
Newbie
Posts: 6
Joined: Fri Jun 19, 2015 10:03 am
Location: Playing CSGO
Contact:

SyntaxError: unexpected EOF while parsing (<none>, line 1)

#1 Post by Mark9870 »

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 67, in script
    gc "..."
SyntaxError: unexpected EOF while parsing (<none>, line 1)

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 67, in script
    gc "..."
  File "/home/mark/Desktop/renpy-6.99.4-sdk/renpy/ast.py", line 593, in execute
    renpy.exports.say(who, what, interact=self.interact)
  File "/home/mark/Desktop/renpy-6.99.4-sdk/renpy/exports.py", line 1021, in say
    who(what, interact=interact)
  File "/home/mark/Desktop/renpy-6.99.4-sdk/renpy/character.py", line 796, in __call__
    who = renpy.python.py_eval(who)
  File "/home/mark/Desktop/renpy-6.99.4-sdk/renpy/python.py", line 1482, in py_eval
    return eval(py_compile(source, 'eval'), globals, locals)
  File "/home/mark/Desktop/renpy-6.99.4-sdk/renpy/python.py", line 512, in py_compile
    raise e
SyntaxError: unexpected EOF while parsing (<none>, line 1)

Linux-3.16.0-40-generic-x86_64-with-debian-jessie-sid
Ren'Py 6.99.4.467
Project1 0.0
I've tried this with windows but it also shows the same error and i'm getting very confused :?

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: SyntaxError: unexpected EOF while parsing (<none>, line

#2 Post by trooper6 »

The problem seems to be around line 67 of your script.rpy file.
In order you help, you should post your code, inside of the [ code][ /code] tags please (without the spaces)

If your script.rpy isn't very long post the whole thing. If it is long post the as much as we need to get the context. So, certainly line 67, but also a bit that comes before or after...and anything it is referencing. For example, it looks like that line is a character named gc talking...so also post the code were you define gc.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Mark9870
Newbie
Posts: 6
Joined: Fri Jun 19, 2015 10:03 am
Location: Playing CSGO
Contact:

Re: SyntaxError: unexpected EOF while parsing (<none>, line

#3 Post by Mark9870 »

Line 67 is empty, gc was talking at line 60
I'm also having problems with DynamicCharacter and it seems to be the problem, when i remove the dynamic character tag it works properly.

Define.

Code: Select all

define gc = DynamicCharacter('\"Asada\" Kim',color="#123456")
58-72.

Code: Select all

 58   "Surprised, i stare at her."
 59   
 60   gc "..."
 61   
 62   "Still surprised, i went inside my house."
 63   
 64   jc "I think i'll go to sleep again.."
 65
 66   show testbg with fade
 67   
 68   "I woke up."
 69   
 70  "It's afternoon."
 71   
 72  "I went outside to buy some food again."
    

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: SyntaxError: unexpected EOF while parsing (<none>, line

#4 Post by nyaatrap »

DynamicCharater uses variable name as string, so \" doesn't work.
Though it's an obsolesced function.

Code: Select all

define name = Character("[variable]")

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: SyntaxError: unexpected EOF while parsing (<none>, line

#5 Post by trooper6 »

The DynamicCharacter is what is causing your problem. There are no references to DynamicCharacter in the current Ren'Py documentation. The only thing I could find would be on the out-of-date wiki. So I think DynamicCharacter is no longer a thing anymore. What do you want the Dynamic Character for? I assume so that you can change the name of the character? This is the way to do it nowadays:

Code: Select all

default char_name = '\"Asada\" Kim'
define gc = DynamicCharacter('[char_name]',color="#123456")

label start:
    gc "Right now my name is \"Asada\" Kim."
    $ char_name = "Chad"
    gc "Right now my name is Chad."
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Mark9870
Newbie
Posts: 6
Joined: Fri Jun 19, 2015 10:03 am
Location: Playing CSGO
Contact:

Re: SyntaxError: unexpected EOF while parsing (<none>, line

#6 Post by Mark9870 »

Oh so i was browsing the outdated wiki. Thanks :)

Sylveon91
Newbie
Posts: 1
Joined: Mon Nov 12, 2018 6:32 pm
Contact:

Re: SyntaxError: unexpected EOF while parsing (<none>, line 1)

#7 Post by Sylveon91 »

I'm having the same problem,but I don't have dynamic characters.

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 18, in script call
    call shownote(Hello!)
  File "game/notes.rpy", line 84, in script
    label shownote(note=None, music=True, track=None, revert_music=True, img=None, where=truecenter, paper=None):
SyntaxError: unexpected EOF while parsing (game/script.rpy, line 18)

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 18, in script call
    call shownote(Hello!)
  File "game/notes.rpy", line 84, in script
    label shownote(note=None, music=True, track=None, revert_music=True, img=None, where=truecenter, paper=None):
  File "C:\Users\Brendan\Downloads\renpy-7.0.0-sdk\renpy\ast.py", line 1409, in execute
    args, kwargs = self.arguments.evaluate()
  File "C:\Users\Brendan\Downloads\renpy-7.0.0-sdk\renpy\ast.py", line 186, in evaluate
    args.append(renpy.python.py_eval(v, locals=scope))
  File "C:\Users\Brendan\Downloads\renpy-7.0.0-sdk\renpy\python.py", line 1942, in py_eval
    code = py_compile(code, 'eval')
  File "C:\Users\Brendan\Downloads\renpy-7.0.0-sdk\renpy\python.py", line 674, in py_compile
    raise e
SyntaxError: unexpected EOF while parsing (game/script.rpy, line 18)

Windows-8-6.2.9200
Ren'Py 7.1.1.929
My Friend Melody 1.0
Tue Nov 13 17:50:16 2018
I can't figure out how to fix it what so ever.

Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot]