[Python] "Ren'Py mod: AttributeError: 'StoreModule' object has no attribute 'trans' when...

Discussão em 'Python' iniciado por Stack, Julho 16, 2025.

  1. Stack

    Stack Membro Participativo

    I'm working on a mod for the visual novel Everlasting Summer, which runs on Ren'Py.

    While testing compatibility between mods and how save files behave when some of them are disabled, I ran into a strange issue.

    Here's what happens:

    I load our mod together with another one ("7 Days of Summer") using an in-game mod manager — no issues, everything runs fine.

    I create a save while both mods are active.

    Later, I disable our mod and try to load that save again — with only "7 Days of Summer" enabled.

    When I do, the game crashes with the following error:

    AttributeError: 'StoreModule' object has no attribute 'trans' (This happens during renpy.load(fn) in 00action_file.rpy, line 462.)

    Now here's the strange part: Our mod doesn't define any variable, transform, or screen called trans, and I can't find it anywhere in our code. So I have no idea where this trans is coming from.

    My best guess is that something in the runtime, or possibly in another mod (or Ren'Py itself?), introduced this trans attribute dynamically, and it ended up serialized into the save file.

    So now, without our mod active, Ren'Py tries to restore it and fails.

    We checked our code many times, but did not find any "trans" variables or transforms.

    We don’t control the other mod ("7 Days of Summer"), so we can’t rely on patching anything there. I’d prefer not to require players to keep our mod enabled forever just to load old saves.

    Has anyone run into a similar issue with unexpected variables ending up in saves?

    Is there a way to safely load saves even if some variables are missing?

    Or is this just an inherent limitation of how Ren'Py saves work?

    Continue reading...

Compartilhe esta Página