great job, appreciated i just get an error screen in the last scene with even 'shower scene' idk why it only happens in that instance
I'm not sure how you did this! Did you use a save editor or unlocker? Can you attach your save folder?
"StopIteration" means that it tried to move to the next iteration of an "iterator" when there was no next value.
That line is in the code block for replaying sex in the shower with Eve from the Cookie Jar. It checks the persistent save (which keeps track of stuff that you've done across all playthroughs) to see which "variants" of this scene you've unlocked (cis or trans) and stores them in a Python tuple (called an "array" in most languages).
If the tuple has more than one value in it, it asks if you want to see the Cis or Trans version of the scene. When you make your choice, it calls the scene and passes your "gender" choice so that it can display the right genitals.
If the tuple doesn't have more than one value, it skips to line 205, which converts the tuple to an iterator and uses next() to go to the first iteration, calling the shower scene with whatever "gender" it finds at the beginning of the iterator. But it doesn't check if there's anything in the tuple first! If it tries to move to the next iteration of an empty iterator, it will throw the StopIteration exception and crash the game (as in your screenshot), unless you specify a default value, which the code doesn't do. It also doesn't handle the exception if it gets triggered.
This is extremely bad coding!
There were two ways to prevent this error from being possible. The first was to supply a default value to the next() function,
which you should always do if there's a possibility that there is no next value, unless you add a handler for StopIteration exception. Though easier, I wouldn't choose that approach because you would be stuck with the default option if your save was corrupted. The second solution was to check if the length of the tuple is 1 (instead of >1). If it's 1, then it's safe to convert the tuple to an iterator and use the first value to call the sex scene. Even if the save is corrupted and it contains a value other than "cis" or "trans", it will default to cisgender if the scene is given a gender other than "trans". If the length isn't 1 (because it's 0 or 2+), then let the user choose Cis or Trans.
I can prevent this error from being thrown by rewriting the code according to best practices, but I can't figure out why the variant list was empty. That could only happen if you somehow unlocked the scene without unlocking either variant. The easiest way to unlock the scene is through the cheat menu. In that case, unlock_all_scenes() iterates through all of the replayable scenes and adds them to the Cookie Jar. If a scene has variants, it iterates through the variants and unlocks all of them, so it's probably not that.
The scene can also be unlocked by two events during playthrough. One is in "eveX2_bath_eve", in which you surprise Eve in the shower after weekend morning sex. There, the scene is unlocked by:
Code:
$ unlock_scene('Eve', '08_unlocked', variant=gender)
That would be a problem if there wasn't a variable called gender, but the variable was set to "cis" or "trans" two lines earlier.
The other place it can be unlocked is in "eveX2_post_eve". That's called when you talk to Eve on the roof and suggest having a shower together. There again, it sets a variable called "gender" and sets it to either "cis" or "trans", and then uses that value to unlock the appropriate variant.
The error was made possible by bad coding by the developers, but I'd like to see what's in your persistent save file to figure out why their bad coding practices ended up throwing an error. In the meantime, I've rewritten the code to prevent the StopIteration exception from occurring. Unzip this file in your "<SummerTime Saga>\game" directory. This code will be in Beta12. I'm going to try to draw the devs' attention to this bad code on Discord.