## Save/Load screen exception that is carrying over from previous versions

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.
Message
Author
Overlord-52
Newbie
Posts: 3
Joined: Tue Jan 28, 2020 1:19 am
Contact:

### Save/Load screen exception that is carrying over from previous versions

While attempting to save on a VN, I entered something like "Stay Path/Poison [Epic] Ending." The game threw an exception and I don't even know where to begin fixing it, I've never fiddled with Ren'py nor am I code savvy in the slightest. The weirdest (see frustrating) part is even after deleting, re-downloading, and unpacking the new version of the game, I get the same error message whenever I try to access either the save or load screens.

Here is the traceback it gives me, any help on correcting this would be appreciated (I'd also like to know why the error carries over through new versions):

I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/screens.rpy", line 943, in execute
File "game/screens.rpy", line 943, in execute
File "game/screens.rpy", line 947, in execute
File "game/screens.rpy", line 950, in execute
File "game/screens.rpy", line 950, in execute
File "game/screens.rpy", line 954, in execute
File "game/screens.rpy", line 666, in execute
File "game/screens.rpy", line 666, in execute
File "game/screens.rpy", line 676, in execute
File "game/screens.rpy", line 679, in execute
File "game/screens.rpy", line 739, in execute
File "game/screens.rpy", line 742, in execute
File "game/screens.rpy", line 771, in execute
File "game/screens.rpy", line 954, in execute
File "game/screens.rpy", line 956, in execute
File "game/screens.rpy", line 975, in execute
File "game/screens.rpy", line 983, in execute
File "game/screens.rpy", line 987, in execute
File "game/screens.rpy", line 990, in execute
File "game/screens.rpy", line 997, in execute
NameError: Name 'Epic' is not defined.

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

Full traceback:
File "renpy/common/_layout/screen_main_menu.rpym", line 28, in script
python hide:
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
exec bytecode in 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()
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
root_widget.visit_all(lambda i : i.per_interact())
d.visit_all(callback, seen)
d.visit_all(callback, seen)
d.visit_all(callback, seen)
d.visit_all(callback, seen)
callback(self)
root_widget.visit_all(lambda i : i.per_interact())
self.update()
self.screen.function(**self.scope)
File "game/screens.rpy", line 943, in execute
File "game/screens.rpy", line 943, in execute
File "game/screens.rpy", line 947, in execute
File "game/screens.rpy", line 950, in execute
File "game/screens.rpy", line 950, in execute
File "game/screens.rpy", line 954, in execute
File "game/screens.rpy", line 666, in execute
File "game/screens.rpy", line 666, in execute
File "game/screens.rpy", line 676, in execute
File "game/screens.rpy", line 679, in execute
File "game/screens.rpy", line 739, in execute
File "game/screens.rpy", line 742, in execute
File "game/screens.rpy", line 771, in execute
File "game/screens.rpy", line 954, in execute
File "game/screens.rpy", line 956, in execute
File "game/screens.rpy", line 975, in execute
File "game/screens.rpy", line 983, in execute
File "game/screens.rpy", line 987, in execute
File "game/screens.rpy", line 990, in execute
File "game/screens.rpy", line 997, in execute
self.set_text(text, scope, substitute)
i, did_sub = renpy.substitutions.substitute(i, scope, substitute)
s = formatter.vformat(s, (), kwargs)
File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/string.py", line 563, in vformat
File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/string.py", line 585, in _vformat
File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/string.py", line 646, in get_field
File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/string.py", line 605, in get_value
raise NameError("Name '{}' is not defined.".format(key))
NameError: Name 'Epic' is not defined.

Windows-7-6.1.7601-SP1
Ren'Py 7.2.0.408
Sanguine Rose 3.6.0 3.6.0
Tue Jan 28 00:21:50 2020

Imperf3kt
Lemma-Class Veteran
Posts: 2935
Joined: Mon Dec 14, 2015 5:05 am
Contact:

### Re: Save/Load screen exception that is carrying over from previous versions

The error message's final line states:
NameError: Name 'Epic' is not defined.
Where is "epic" used? Is it something you type in as a player, or is it something you are displaying on the screen as text?
Have you defined it within your script using define or default?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Free Android GUI - Updated occasionally

isobellesophia
Miko-Class Veteran
Posts: 928
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends 2020 aka (AI Teacher friend), Friendly Universities 2020-2021 (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

### Re: Save/Load screen exception that is carrying over from previous versions

Show us the code where 'epic' was named, maybe you forgot to define it. If it is.

Then here

Code: Select all

define epic = True
or

Code: Select all

default epic = False
I am a friendly user, please respect and have a good day.

Main project i am currently working:

strayerror
Regular
Posts: 114
Joined: Fri Jan 04, 2019 3:44 pm
Contact:

### Re: Save/Load screen exception that is carrying over from previous versions

This reads like a player entering a custom save name containing interpolation that's not getting sanitised correctly by the game, resulting in the interface trying to substitute the [Epic] part.

Overload-52 if you're a player, then the reason your reset didn't work is that because it's the name of your save together with a bug in the game that's causing the issue. To resolve it you'll need to go and find your save files and remove the problematic one (be wary, there are potentially two locations/copies of save files - recommend moving one copy and doing the follow on the other). I'd suggest moving all but persistent to a separate directory, starting the game, bringing up the load menu and (all being well), move the save files back one at a time, until you find the one that triggers the crash. Unfortunately that one will likely need to be discarded, but the rest of your saves should be fine. Remove the same file from the secondary store files, and restore the rest. Oh, and if this does fix it, report it to the game creator so they can perhaps fix the issue on the code side, and don't use square brackets in save names until playing a version with the bug resolved. :)

If you're a creator/developer, then the above still holds true for getting the game started, but it's likely that where ever the player-sourced save name is displayed is trying to do interpolation/substitution and shouldn't. I believe the resolution would be to add substitute False to the text widget meant to display that text.

Hopefully this is helpful, but if I've completely misunderstood the problem then all this can likely be ignored. :D

Overlord-52
Newbie
Posts: 3
Joined: Tue Jan 28, 2020 1:19 am
Contact:

### Re: Save/Load screen exception that is carrying over from previous versions

Where would I find the secondary store files? The problem is, I've deleted all of the save files and the error is still occurring.

Imperf3kt
Lemma-Class Veteran
Posts: 2935
Joined: Mon Dec 14, 2015 5:05 am
Contact:

### Re: Save/Load screen exception that is carrying over from previous versions

renpy saves files locally, in the game directory, and also (for Windows at least) in your app data cache.
access it by pressing Windows key + R and type %appdata% then hit enter.

browse the folders, you'll find it soon enough.
Note that it is safe to delete the contents of many of these folders (but don't do it unless you know what it causes)
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Free Android GUI - Updated occasionally

Overlord-52
Newbie
Posts: 3
Joined: Tue Jan 28, 2020 1:19 am
Contact:

### Re: Save/Load screen exception that is carrying over from previous versions

Thank you all for the help. I was able to find the offending save file back up, and everything appears to be in working order again. It was weird to see saves for VNs I hadn't played in years.

### Who is online

Users browsing this forum: Google [Bot]