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.
Post Reply
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

#1 Post by Overlord-52 »

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:
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\ast.py", line 896, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\python.py", line 1929, in py_exec_bytecode
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()
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\ui.py", line 289, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\display\core.py", line 2687, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\display\core.py", line 3071, in interact_core
root_widget.visit_all(lambda i : i.per_interact())
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\display\core.py", line 531, in visit_all
d.visit_all(callback, seen)
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\display\core.py", line 531, in visit_all
d.visit_all(callback, seen)
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\display\core.py", line 531, in visit_all
d.visit_all(callback, seen)
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\display\core.py", line 531, in visit_all
d.visit_all(callback, seen)
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\display\screen.py", line 424, in visit_all
callback(self)
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\display\core.py", line 3071, in <lambda>
root_widget.visit_all(lambda i : i.per_interact())
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\display\screen.py", line 434, in per_interact
self.update()
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\display\screen.py", line 619, in 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
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\text\text.py", line 1471, in __init__
self.set_text(text, scope, substitute)
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\text\text.py", line 1590, in set_text
i, did_sub = renpy.substitutions.substitute(i, scope, substitute)
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\substitutions.py", line 244, in 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
File "C:\Users\djm6833\Downloads\SanguineRose-3.6.0-pc\renpy\substitutions.py", line 203, in __getitem__
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

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

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

#2 Post by Imperf3kt »

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.

Current project: GGD Mentor

Twitter

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (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

#3 Post by isobellesophia »

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.


Image

Image


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

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

#4 Post by strayerror »

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

#5 Post by Overlord-52 »

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.

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

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

#6 Post by Imperf3kt »

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.

Current project: GGD Mentor

Twitter

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

#7 Post by Overlord-52 »

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.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot]