Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Exception Occurs Trying to Save or Load!

A topic by M3tav0X created May 06, 2022 Views: 1,019 Replies: 14
Viewing posts 1 to 5

I'm playing on PC. Just installed the new build and started a new playthrough to see the new content.

There was no issue at first, but at the 4th save (I habitually save at every choice while I play through any VN), on the screen where I decide my name for the playthrough, the game suddenly started displaying an error whenever I try to open the save/load menus! I can't access the save files from the main menu, either; I can't access any of my save files now!


The following is from after I select "Continue" in the main menu:

[code]

I'm sorry, but an uncaught exception occurred.

While running game code:

  File "game/extra_screens_menu_screens.rpy", line 318, in execute

    screen mobileLoadMenu():

  File "game/extra_screens_menu_screens.rpy", line 318, in execute

    screen mobileLoadMenu():

  File "game/extra_screens_menu_screens.rpy", line 332, in execute

    use mobileFileSlots(_("Load"), 'load')

  File "game/extra_screens_menu_screens.rpy", line 685, in execute

    screen mobileFileSlots(title, saveLoad):

  File "game/extra_screens_menu_screens.rpy", line 685, in execute

    screen mobileFileSlots(title, saveLoad):

  File "game/extra_screens_menu_screens.rpy", line 690, in execute

    fixed:

  File "game/extra_screens_menu_screens.rpy", line 697, in execute

    grid gui.file_slot_cols gui.file_slot_rows:

  File "game/extra_screens_menu_screens.rpy", line 704, in execute

    for i in range(gui.file_slot_cols * gui.file_slot_rows):

  File "game/extra_screens_menu_screens.rpy", line 706, in execute

    button:

  File "game/extra_screens_menu_screens.rpy", line 712, in execute

    has vbox

  File "game/extra_screens_menu_screens.rpy", line 718, in execute

    if FileSaveName(slot)=="":

  File "game/extra_screens_menu_screens.rpy", line 722, in execute

    if "@" in FileSaveName(slot):

  File "game/extra_screens_menu_screens.rpy", line 733, in execute

    text FileSaveName(slot) xalign 0.5 size 24

NameError: Name 'bg_color' is not defined.

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

Full traceback:

  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in script

    python hide:

  File "renpy/ast.py", line 922, in execute

    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)

  File "renpy/python.py", line 2218, in py_exec_bytecode

    exec(bytecode, globals, locals)

  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in <module>

    python hide:

  File "renpy/common/_layout/screen_main_menu.rpym", line 35, in _execute_python_hide

    ui.interact()

  File "renpy/ui.py", line 298, in interact

    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)

  File "renpy/display/core.py", line 3276, in interact

    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, **kwargs)

  File "renpy/display/core.py", line 3693, in interact_core

    root_widget.visit_all(lambda i : i.per_interact())

  File "renpy/display/core.py", line 567, in visit_all

    d.visit_all(callback, seen)

  File "renpy/display/core.py", line 567, in visit_all

    d.visit_all(callback, seen)

  File "renpy/display/core.py", line 567, in visit_all

    d.visit_all(callback, seen)

  File "renpy/display/core.py", line 567, in visit_all

    d.visit_all(callback, seen)

  File "renpy/display/screen.py", line 432, in visit_all

    callback(self)

  File "renpy/display/core.py", line 3693, in <lambda>

    root_widget.visit_all(lambda i : i.per_interact())

  File "renpy/display/screen.py", line 443, in per_interact

    self.update()

  File "renpy/display/screen.py", line 631, in update

    self.screen.function(**self.scope)

  File "game/extra_screens_menu_screens.rpy", line 318, in execute

    screen mobileLoadMenu():

  File "game/extra_screens_menu_screens.rpy", line 318, in execute

    screen mobileLoadMenu():

  File "game/extra_screens_menu_screens.rpy", line 332, in execute

    use mobileFileSlots(_("Load"), 'load')

  File "game/extra_screens_menu_screens.rpy", line 685, in execute

    screen mobileFileSlots(title, saveLoad):

  File "game/extra_screens_menu_screens.rpy", line 685, in execute

    screen mobileFileSlots(title, saveLoad):

  File "game/extra_screens_menu_screens.rpy", line 690, in execute

    fixed:

  File "game/extra_screens_menu_screens.rpy", line 697, in execute

    grid gui.file_slot_cols gui.file_slot_rows:

  File "game/extra_screens_menu_screens.rpy", line 704, in execute

    for i in range(gui.file_slot_cols * gui.file_slot_rows):

  File "game/extra_screens_menu_screens.rpy", line 706, in execute

    button:

  File "game/extra_screens_menu_screens.rpy", line 712, in execute

    has vbox

  File "game/extra_screens_menu_screens.rpy", line 718, in execute

    if FileSaveName(slot)=="":

  File "game/extra_screens_menu_screens.rpy", line 722, in execute

    if "@" in FileSaveName(slot):

  File "game/extra_screens_menu_screens.rpy", line 733, in execute

    text FileSaveName(slot) xalign 0.5 size 24

  File "renpy/text/text.py", line 1541, in __init__

    self.set_text(text, scope, substitute)

  File "renpy/text/text.py", line 1660, in set_text

    i, did_sub = renpy.substitutions.substitute(i, scope, substitute)

  File "renpy/substitutions.py", line 270, in substitute

    s = formatter.vformat(s, (), kwargs)

  File "/home/tom/ab/renpy-build/tmp/install.android-x86_64/lib/python2.7/string.py", line 563, in vformat

  File "/home/tom/ab/renpy-build/tmp/install.android-x86_64/lib/python2.7/string.py", line 585, in _vformat

  File "/home/tom/ab/renpy-build/tmp/install.android-x86_64/lib/python2.7/string.py", line 646, in get_field

  File "/home/tom/ab/renpy-build/tmp/install.android-x86_64/lib/python2.7/string.py", line 605, in get_value

  File "renpy/substitutions.py", line 228, in __getitem__

    raise NameError("Name '{}' is not defined.".format(key))

NameError: Name 'bg_color' is not defined.

Windows-10-10.0.19041

Ren'Py 7.4.6.1693

Minotaur Hotel 0.6.1

Fri May  6 14:31:05 2022

[/code]

Developer

Hello M3tav0x! I'm so sorry you encountered this issue, we shared the build with about a dozen people for playtesting and this didn't happen, so it's not exactly something I can easily reproduce on my end.
Let's try something: I'm going to share a version of the extra_screens_menu_screens.rpy file (the one that is causing the issue):

download here

Try replacing that in your 'game' folder, please let me know asap if that fixes it and we can rollout a hotfix

(1 edit)

Just tried it and unfortunately, it didn't work... ;n;


[EDIT] 

The exception traceback mentions that the issue is a name error with "bg_text" being undefined.

I'm not really sure what that actually means, tho.....

Developer

Alright, let's try again
version 2

SUCCESS! It worked!!

Thank you so much!!!

Developer(+1)

Excellent, glad I could solve the issue!
Hope you enjoy the update and sorry for the inconvenience. I'll be rolling out a hotfix.

Heyo Nanoff, really excited to check out the update! Had the same problem though the "line 712" etc is a little different. For me, it happened when I tried to save a game with my character's name as "Anon". I was trying to pick into the VIP room. Now, the save and load functions result in the aforementioned error. Think the save file is broken - how do I delete it from my PC?

Developer

Sorry to hear that, can you include the traceback? 

Hi Nanoff, here's the traceback. The error occurred after I saved in the VIP room. I can't recall the exact scene my main save is at, but it would be at the restaurant after the opening of the hotel. Kota is the manager with Khebish as the third employee brought in via the Arts background. 

While running game code:

  File "game/extra_screens_menu_screens.rpy", line 318, in execute

    screen mobileLoadMenu():

  File "game/extra_screens_menu_screens.rpy", line 318, in execute

    screen mobileLoadMenu():

  File "game/extra_screens_menu_screens.rpy", line 332, in execute

    use mobileFileSlots(_("Load"), 'load')

  File "game/extra_screens_menu_screens.rpy", line 685, in execute

    screen mobileFileSlots(title, saveLoad):

  File "game/extra_screens_menu_screens.rpy", line 685, in execute

    screen mobileFileSlots(title, saveLoad):

  File "game/extra_screens_menu_screens.rpy", line 692, in execute

    fixed:

  File "game/extra_screens_menu_screens.rpy", line 699, in execute

    grid gui.file_slot_cols gui.file_slot_rows:

  File "game/extra_screens_menu_screens.rpy", line 706, in execute

    for i in range(gui.file_slot_cols * gui.file_slot_rows):

  File "game/extra_screens_menu_screens.rpy", line 708, in execute

    button:

  File "game/extra_screens_menu_screens.rpy", line 714, in execute

    has vbox

  File "game/extra_screens_menu_screens.rpy", line 720, in execute

    if FileSaveName(slot)=="":

  File "game/extra_screens_menu_screens.rpy", line 724, in execute

    if "@" in FileSaveName(slot):

  File "game/extra_screens_menu_screens.rpy", line 735, in execute

    text FileSaveName(slot) xalign 0.5 size 24

NameError: Name '#eccb37' is not defined.

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

Full traceback:

  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in script

    python hide:

  File "renpy/ast.py", line 922, in execute

    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)

  File "renpy/python.py", line 2218, in py_exec_bytecode

    exec(bytecode, globals, locals)

  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in <module>

    python hide:

  File "renpy/common/_layout/screen_main_menu.rpym", line 35, in _execute_python_hide

    ui.interact()

  File "renpy/ui.py", line 298, in interact

    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)

  File "renpy/display/core.py", line 3276, in interact

    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, **kwargs)

  File "renpy/display/core.py", line 3693, in interact_core

    root_widget.visit_all(lambda i : i.per_interact())

  File "renpy/display/core.py", line 567, in visit_all

    d.visit_all(callback, seen)

  File "renpy/display/core.py", line 567, in visit_all

    d.visit_all(callback, seen)

  File "renpy/display/core.py", line 567, in visit_all

    d.visit_all(callback, seen)

  File "renpy/display/core.py", line 567, in visit_all

    d.visit_all(callback, seen)

  File "renpy/display/screen.py", line 432, in visit_all

    callback(self)

  File "renpy/display/core.py", line 3693, in <lambda>

    root_widget.visit_all(lambda i : i.per_interact())

  File "renpy/display/screen.py", line 443, in per_interact

    self.update()

  File "renpy/display/screen.py", line 631, in update

    self.screen.function(**self.scope)

  File "game/extra_screens_menu_screens.rpy", line 318, in execute

    screen mobileLoadMenu():

  File "game/extra_screens_menu_screens.rpy", line 318, in execute

    screen mobileLoadMenu():

  File "game/extra_screens_menu_screens.rpy", line 332, in execute

    use mobileFileSlots(_("Load"), 'load')

  File "game/extra_screens_menu_screens.rpy", line 685, in execute

    screen mobileFileSlots(title, saveLoad):

  File "game/extra_screens_menu_screens.rpy", line 685, in execute

    screen mobileFileSlots(title, saveLoad):

  File "game/extra_screens_menu_screens.rpy", line 692, in execute

    fixed:

  File "game/extra_screens_menu_screens.rpy", line 699, in execute

    grid gui.file_slot_cols gui.file_slot_rows:

  File "game/extra_screens_menu_screens.rpy", line 706, in execute

    for i in range(gui.file_slot_cols * gui.file_slot_rows):

  File "game/extra_screens_menu_screens.rpy", line 708, in execute

    button:

  File "game/extra_screens_menu_screens.rpy", line 714, in execute

    has vbox

  File "game/extra_screens_menu_screens.rpy", line 720, in execute

    if FileSaveName(slot)=="":

  File "game/extra_screens_menu_screens.rpy", line 724, in execute

    if "@" in FileSaveName(slot):

  File "game/extra_screens_menu_screens.rpy", line 735, in execute

    text FileSaveName(slot) xalign 0.5 size 24

  File "renpy/text/text.py", line 1541, in __init__

    self.set_text(text, scope, substitute)

  File "renpy/text/text.py", line 1660, in set_text

    i, did_sub = renpy.substitutions.substitute(i, scope, substitute)

  File "renpy/substitutions.py", line 270, in substitute

    s = formatter.vformat(s, (), kwargs)

  File "/home/tom/ab/renpy-build/tmp/install.android-x86_64/lib/python2.7/string.py", line 563, in vformat

  File "/home/tom/ab/renpy-build/tmp/install.android-x86_64/lib/python2.7/string.py", line 585, in _vformat

  File "/home/tom/ab/renpy-build/tmp/install.android-x86_64/lib/python2.7/string.py", line 646, in get_field

  File "/home/tom/ab/renpy-build/tmp/install.android-x86_64/lib/python2.7/string.py", line 605, in get_value

  File "renpy/substitutions.py", line 228, in __getitem__

    raise NameError("Name '{}' is not defined.".format(key))

NameError: Name '#eccb37' is not defined.

Windows-10-10.0.22000

Ren'Py 7.4.6.1693

Minotaur Hotel 0.6.1.1

Sat May  7 21:01:49 2022

Developer

I found exactly  where the issue is: you have to save between getting your background and either ending chapter 1 or going into the VIP room for the error to trigger.
It's very specific which is why none of the poeple playtesting it found it.

Now that i identified the source of the issue I'm rolling out a 0.6.1.2 that should fix the bug so it doesn't happen to anyone else, AND would handle your messed up save file so it doesn't throw an error, no work on your part.  There's nothing wrong with the save file itself so don't worry about that, renpy just has a hard time parsing the save name.

Sorry for the inconvenience and thank you for helping me fix this.

(+1)

Hi Nanoff, thanks for the quick response! really appreciate all the hard work and love you and the team have poured into this VA. 

I downloaded the 0.6.1.1 hotfix but I'm still getting the same issue.

[code]

I'm sorry, but an uncaught exception occurred.

While running game code:

  File "game/extra_screens_menu_screens.rpy", line 318, in execute

    screen mobileLoadMenu():

  File "game/extra_screens_menu_screens.rpy", line 318, in execute

    screen mobileLoadMenu():

  File "game/extra_screens_menu_screens.rpy", line 332, in execute

    use mobileFileSlots(_("Load"), 'load')

  File "game/extra_screens_menu_screens.rpy", line 685, in execute

    screen mobileFileSlots(title, saveLoad):

  File "game/extra_screens_menu_screens.rpy", line 685, in execute

    screen mobileFileSlots(title, saveLoad):

  File "game/extra_screens_menu_screens.rpy", line 692, in execute

    fixed:

  File "game/extra_screens_menu_screens.rpy", line 699, in execute

    grid gui.file_slot_cols gui.file_slot_rows:

  File "game/extra_screens_menu_screens.rpy", line 706, in execute

    for i in range(gui.file_slot_cols * gui.file_slot_rows):

  File "game/extra_screens_menu_screens.rpy", line 708, in execute

    button:

  File "game/extra_screens_menu_screens.rpy", line 714, in execute

    has vbox

  File "game/extra_screens_menu_screens.rpy", line 720, in execute

    if FileSaveName(slot)=="":

  File "game/extra_screens_menu_screens.rpy", line 724, in execute

    if "@" in FileSaveName(slot):

  File "game/extra_screens_menu_screens.rpy", line 735, in execute

    text FileSaveName(slot) xalign 0.5 size 24

NameError: Name '#ec4f37' is not defined.

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

Full traceback:

  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in script

    python hide:

  File "renpy/ast.py", line 922, in execute

    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)

  File "renpy/python.py", line 2218, in py_exec_bytecode

    exec(bytecode, globals, locals)

  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in <module>

    python hide:

  File "renpy/common/_layout/screen_main_menu.rpym", line 35, in _execute_python_hide

    ui.interact()

  File "renpy/ui.py", line 298, in interact

    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)

  File "renpy/display/core.py", line 3276, in interact

    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, **kwargs)

  File "renpy/display/core.py", line 3693, in interact_core

    root_widget.visit_all(lambda i : i.per_interact())

  File "renpy/display/core.py", line 567, in visit_all

    d.visit_all(callback, seen)

  File "renpy/display/core.py", line 567, in visit_all

    d.visit_all(callback, seen)

  File "renpy/display/core.py", line 567, in visit_all

    d.visit_all(callback, seen)

  File "renpy/display/core.py", line 567, in visit_all

    d.visit_all(callback, seen)

  File "renpy/display/screen.py", line 432, in visit_all

    callback(self)

  File "renpy/display/core.py", line 3693, in <lambda>

    root_widget.visit_all(lambda i : i.per_interact())

  File "renpy/display/screen.py", line 443, in per_interact

    self.update()

  File "renpy/display/screen.py", line 631, in update

    self.screen.function(**self.scope)

  File "game/extra_screens_menu_screens.rpy", line 318, in execute

    screen mobileLoadMenu():

  File "game/extra_screens_menu_screens.rpy", line 318, in execute

    screen mobileLoadMenu():

  File "game/extra_screens_menu_screens.rpy", line 332, in execute

    use mobileFileSlots(_("Load"), 'load')

  File "game/extra_screens_menu_screens.rpy", line 685, in execute

    screen mobileFileSlots(title, saveLoad):

  File "game/extra_screens_menu_screens.rpy", line 685, in execute

    screen mobileFileSlots(title, saveLoad):

  File "game/extra_screens_menu_screens.rpy", line 692, in execute

    fixed:

  File "game/extra_screens_menu_screens.rpy", line 699, in execute

    grid gui.file_slot_cols gui.file_slot_rows:

  File "game/extra_screens_menu_screens.rpy", line 706, in execute

    for i in range(gui.file_slot_cols * gui.file_slot_rows):

  File "game/extra_screens_menu_screens.rpy", line 708, in execute

    button:

  File "game/extra_screens_menu_screens.rpy", line 714, in execute

    has vbox

  File "game/extra_screens_menu_screens.rpy", line 720, in execute

    if FileSaveName(slot)=="":

  File "game/extra_screens_menu_screens.rpy", line 724, in execute

    if "@" in FileSaveName(slot):

  File "game/extra_screens_menu_screens.rpy", line 735, in execute

    text FileSaveName(slot) xalign 0.5 size 24

  File "renpy/text/text.py", line 1541, in __init__

    self.set_text(text, scope, substitute)

  File "renpy/text/text.py", line 1660, in set_text

    i, did_sub = renpy.substitutions.substitute(i, scope, substitute)

  File "renpy/substitutions.py", line 270, in substitute

    s = formatter.vformat(s, (), kwargs)

  File "/home/tom/ab/renpy-build/tmp/install.android-x86_64/lib/python2.7/string.py", line 563, in vformat

  File "/home/tom/ab/renpy-build/tmp/install.android-x86_64/lib/python2.7/string.py", line 585, in _vformat

  File "/home/tom/ab/renpy-build/tmp/install.android-x86_64/lib/python2.7/string.py", line 646, in get_field

  File "/home/tom/ab/renpy-build/tmp/install.android-x86_64/lib/python2.7/string.py", line 605, in get_value

  File "renpy/substitutions.py", line 228, in __getitem__

    raise NameError("Name '{}' is not defined.".format(key))

NameError: Name '#ec4f37' is not defined.

Windows-10-10.0.22000

Ren'Py 7.4.6.1693

Minotaur Hotel 0.6.1.1

Sat May  7 08:22:11 2022

[/code]

Developer

I think I know how to fix this

At what point of the game did you save?

The reason why this bug keeps popping up is due to the way save file names are generated and loaded (the variable with the save file name is parsed by the save and load screens to split off the little save file icons with your background and who your lounge manager is, etc.) 

There's an if statement where if your save file has none of these icons it defaults to another format for the save file name and that is what is causing the error

I need to know what that point of the game is

Developer(+1)

Nevermind I fixed it

Developer

Ok, for the people who encountered similar problems- these happen when saving the game at a very specific point (after picking your background but before finishing the prologue). I put a definitive solution to this shit with the 0.6.1.2 version. If your save file is affected, just downloading the new version will solve it.

I'm super sorry you encountered this, it's such a specific border case that none of the dozen or so people doing playtesting the build caught it