[SOLVED] Error with Renpy 14 (?)

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
User avatar
Black Cat 2412
Regular
Posts: 74
Joined: Wed Aug 16, 2017 10:10 am
Projects: Rapunzel: A classic retold
Deviantart: BlackCat2412
Location: Vietnam
Contact:

[SOLVED] Error with Renpy 14 (?)

#1 Post by Black Cat 2412 »

Good day,
I come across with this weird problem that I have no idea why or how to fix it:
I just updated my Renpy 13 to 14 and made an entirely new project with it. Everything work well until suddenly I can't launch my game anymore!
If I do, it pop up this:

Code: Select all

I'm sorry, but an uncaught exception occurred.

After initialization, but before game start.
  File "game/screens.rpy", line 599, in prepare_screen
    screen file_slots(title):
  File "game/screens.rpy", line 599, in prepare
    screen file_slots(title):
  File "game/screens.rpy", line 603, in prepare
    use game_menu(title):
  File "game/screens.rpy", line 603, in prepare
    use game_menu(title):
  File "game/screens.rpy", line 605, in prepare
    fixed:
  File "game/screens.rpy", line 605, in prepare
    fixed:
  File "game/screens.rpy", line 652, in prepare
    hbox:
  File "game/screens.rpy", line 652, in prepare
    hbox:
  File "game/screens.rpy", line 662, in prepare
    if config.has_autosave:
  File "game/screens.rpy", line 662, in prepare
    if config.has_autosave:
  File "game/screens.rpy", line 663, in prepare
    textbutton _("{#auto_page}A") action FilePage("auto")
  File "game/screens.rpy", line 663, in prepare
    textbutton _("{#auto_page}A") action FilePage("auto")
  File "renpy/common/00action_file.rpy", line 536, in __init__
    self.page = str(page)
  File "game/screens.rpy", line 599, in prepare_screen
    screen file_slots(title):
  File "game/screens.rpy", line 599, in prepare
    screen file_slots(title):
  File "game/screens.rpy", line 603, in prepare
    use game_menu(title):
  File "game/screens.rpy", line 603, in prepare
    use game_menu(title):
  File "game/screens.rpy", line 605, in prepare
    fixed:
  File "game/screens.rpy", line 605, in prepare
    fixed:
  File "game/screens.rpy", line 652, in prepare
    hbox:
  File "game/screens.rpy", line 652, in prepare
    hbox:
  File "game/screens.rpy", line 662, in prepare
    if config.has_autosave:
  File "game/screens.rpy", line 662, in prepare
    if config.has_autosave:
  File "game/screens.rpy", line 663, in prepare
    textbutton _("{#auto_page}A") action FilePage("auto")
  File "game/screens.rpy", line 663, in prepare
    textbutton _("{#auto_page}A") action FilePage("auto")
  File "renpy/common/00action_file.rpy", line 536, in __init__
    self.page = str(page)
Exception: Cannot start an interaction in the middle of an interaction, without creating a new context.

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

Full traceback:
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\bootstrap.py", line 306, in bootstrap
    renpy.main.main()
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\main.py", line 520, in main
    run(restart)
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\main.py", line 90, in run
    renpy.display.screen.prepare_screens()
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\display\screen.py", line 873, in prepare_screens
    s.ast.prepare_screen()
  File "game/screens.rpy", line 599, in prepare_screen
    screen file_slots(title):
  File "game/screens.rpy", line 599, in prepare
    screen file_slots(title):
  File "game/screens.rpy", line 603, in prepare
    use game_menu(title):
  File "game/screens.rpy", line 603, in prepare
    use game_menu(title):
  File "game/screens.rpy", line 605, in prepare
    fixed:
  File "game/screens.rpy", line 605, in prepare
    fixed:
  File "game/screens.rpy", line 652, in prepare
    hbox:
  File "game/screens.rpy", line 652, in prepare
    hbox:
  File "game/screens.rpy", line 662, in prepare
    if config.has_autosave:
  File "game/screens.rpy", line 662, in prepare
    if config.has_autosave:
  File "game/screens.rpy", line 663, in prepare
    textbutton _("{#auto_page}A") action FilePage("auto")
  File "game/screens.rpy", line 663, in prepare
    textbutton _("{#auto_page}A") action FilePage("auto")
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\python.py", line 1828, in py_eval_bytecode
    return eval(bytecode, globals, locals)
  File "<screen language>", line 663, in <module>
  File "renpy/common/00action_file.rpy", line 536, in __init__
    self.page = str(page)
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\character.py", line 1013, in __call__
    self.do_display(who, what, cb_args=self.cb_args, **display_args)
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\character.py", line 817, in do_display
    **display_args)
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\character.py", line 566, in display_say
    rv = renpy.ui.interact(mouse='say', type=type, roll_forward=roll_forward)
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\ui.py", line 287, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2620, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2710, in interact_core
    renpy.display.screen.prepare_screens()
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\display\screen.py", line 873, in prepare_screens
    s.ast.prepare_screen()
  File "game/screens.rpy", line 599, in prepare_screen
    screen file_slots(title):
  File "game/screens.rpy", line 599, in prepare
    screen file_slots(title):
  File "game/screens.rpy", line 603, in prepare
    use game_menu(title):
  File "game/screens.rpy", line 603, in prepare
    use game_menu(title):
  File "game/screens.rpy", line 605, in prepare
    fixed:
  File "game/screens.rpy", line 605, in prepare
    fixed:
  File "game/screens.rpy", line 652, in prepare
    hbox:
  File "game/screens.rpy", line 652, in prepare
    hbox:
  File "game/screens.rpy", line 662, in prepare
    if config.has_autosave:
  File "game/screens.rpy", line 662, in prepare
    if config.has_autosave:
  File "game/screens.rpy", line 663, in prepare
    textbutton _("{#auto_page}A") action FilePage("auto")
  File "game/screens.rpy", line 663, in prepare
    textbutton _("{#auto_page}A") action FilePage("auto")
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\python.py", line 1828, in py_eval_bytecode
    return eval(bytecode, globals, locals)
  File "<screen language>", line 663, in <module>
  File "renpy/common/00action_file.rpy", line 536, in __init__
    self.page = str(page)
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\character.py", line 1013, in __call__
    self.do_display(who, what, cb_args=self.cb_args, **display_args)
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\character.py", line 817, in do_display
    **display_args)
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\character.py", line 566, in display_say
    rv = renpy.ui.interact(mouse='say', type=type, roll_forward=roll_forward)
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\ui.py", line 287, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "D:\CHI\CHI_STUFF\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2598, in interact
    raise Exception("Cannot start an interaction in the middle of an interaction, without creating a new context.")
Exception: Cannot start an interaction in the middle of an interaction, without creating a new context.

Windows-7-6.1.7601-SP1
Ren'Py 6.99.14.3135
Rapunzel A classic retold 1.0

The problem? I did not even do anything to the "screen" file yet! All I do was just adding dialogue to the game, and out of no where this happened. I tried launching the Tutorial and The question: it worked fine. I tried launching other projects of mine that was make before the update: it worked fine. It just this one project that was made after the update that cannot be opened, even though it worked perfectly just a moment ago.

What happen? And how can I fix this?

Thank in advance
Last edited by Black Cat 2412 on Mon Jan 22, 2018 10:50 pm, edited 1 time in total.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Error with Renpy 6.99.14 (??!)

#2 Post by Imperf3kt »

First thing I'd check is indentation.
There've been many times where I accidentally left out one block of indentation that have caused all sorts of oddities, sometimes not letting me clear persistent or start the game.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Black Cat 2412
Regular
Posts: 74
Joined: Wed Aug 16, 2017 10:10 am
Projects: Rapunzel: A classic retold
Deviantart: BlackCat2412
Location: Vietnam
Contact:

Re: Error with Renpy 14 (??!)

#3 Post by Black Cat 2412 »

I checked it, and there was nothing wrong. I even tried removing the latest changes to the script, up to the point it had worked well before. But it all to no avail : ( The problem persists.

User avatar
ComputerArt.Club
Veteran
Posts: 427
Joined: Mon May 22, 2017 8:12 am
Completed: Famous Fables, BoPoMoFo: Learn Chinese, Santa's workshop, Cat's Bath, Computer Art Club
Location: Taiwan
Contact:

Re: Error with Renpy 14 (??!)

#4 Post by ComputerArt.Club »

Could it be that there is some character in the dialog that needs to be escaped or perhaps some quotation mark forgotten?

For reference of others with a similar problem:
https://www.renpy.org/doc/html/text.htm ... characters

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Error with Renpy 14 (??!)

#5 Post by Remix »

Are you using screens/gui/options files from an older version?
Are you loading a save game from an older version?

From the traceback, the route passes through screens.rpy -> screen file_slots -> if config.has_autosave -> error on textbutton ... so I would check a 6.99.14 screens.rpy (create new project if needed) vs your game one for code near there.
Frameworks & Scriptlets:

User avatar
Black Cat 2412
Regular
Posts: 74
Joined: Wed Aug 16, 2017 10:10 am
Projects: Rapunzel: A classic retold
Deviantart: BlackCat2412
Location: Vietnam
Contact:

Re: Error with Renpy 14 (??!)

#6 Post by Black Cat 2412 »

Okay, so I have figured it out: the problem is not with screen or anything: it was with one of my characters
I have this:

Code: Select all

define str = Character("???:")  #"str" is short for stranger
After I changed it to

Code: Select all

define sta = Character("???:")
The problem disappeared, pheww

I still don't know why it caused an error in "screen", though

Anyhow, thank you so much for your time ^^ Have a good day.

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: [SOLVED] Error with Renpy 14 (?)

#7 Post by Remix »

Basically 'str' in Python is a reference to strings and in Ren'py is a Reserved Name

Character is a factory function that returns an object with a __call__ method, so using str as a reference to that gets messy very fast as it does not know if str(1.2) is trying to convert a float to a string or trying to get a character to say 1.2... sort of thing
Frameworks & Scriptlets:

Post Reply

Who is online

Users browsing this forum: No registered users