Ren'Py 'StoreModule' object has no attribute - Error Message in Renpy

SteelyDan14

Formerly Known as GeekBone
Modder
Donor
Jan 13, 2018
1,537
6,756
I am creating a MOD for an AVN. I load the game into the SDK and then add my code. After making changes and testing, I launch it from the SDK and it works perfectly. When I do a fresh install of the AVN, add my MOD files and then run it natively, I get this message.

I am assuming this error is happening because the AVN is using Renpy 7.4 while my SDK is 8.4. I use this exact same code in other MODS and it works fine so I am not sure why it would suddenly throw this error unless it was a versioning error. Google was very limited with responses regarding 'StoreModule' and any associated errors.

Is this a correct assumption, or is there something I am missing.

Code:
Full traceback:
  File "renpy/common/00gamemenu.rpy", line 173, in script
    $ ui.interact()
  File "renpy/ast.py", line 928, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "renpy/python.py", line 2245, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "renpy/common/00gamemenu.rpy", line 173, in <module>
    $ 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 3325, 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 3737, in interact_core
    root_widget.visit_all(lambda i : i.per_interact())
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/screen.py", line 436, in visit_all
    callback(self)
  File "renpy/display/core.py", line 3737, in <lambda>
    root_widget.visit_all(lambda i : i.per_interact())
  File "renpy/display/screen.py", line 447, in per_interact
    self.update()
  File "renpy/display/screen.py", line 637, in update
    self.screen.function(**self.scope)
  File "game/mod/gb_mod.rpy", line 239, in execute
    screen aimeestats():
  File "game/mod/gb_mod.rpy", line 239, in execute
    screen aimeestats():
  File "game/mod/gb_mod.rpy", line 259, in execute
    vpgrid:
  File "game/mod/gb_mod.rpy", line 264, in execute
    vbox:
  File "game/mod/gb_mod.rpy", line 268, in execute
    fixed:
  File "game/mod/gb_mod.rpy", line 270, in execute
    bar value VariableValue("cn.aff", 100)
  File "renpy/sl2/sldisplayables.py", line 252, in sl2bar
    return renpy.display.behavior.Bar(range, value, width, height, vertical=False, **properties)
  File "renpy/display/behavior.py", line 1847, in __init__
    adjustment = value.get_adjustment()
  File "renpy/common/00barvalues.rpy", line 283, in get_adjustment
    value = getattr(self.object, self.field)
AttributeError: 'StoreModule' object has no attribute 'cn.aff'

While running game code:
  File "renpy/common/00gamemenu.rpy", line 173, in script
    $ ui.interact()
  File "renpy/common/00gamemenu.rpy", line 173, in <module>
    $ ui.interact()
  File "game/mod/gb_mod.rpy", line 239, in execute
    screen aimeestats():
  File "game/mod/gb_mod.rpy", line 239, in execute
    screen aimeestats():
  File "game/mod/gb_mod.rpy", line 259, in execute
    vpgrid:
  File "game/mod/gb_mod.rpy", line 264, in execute
    vbox:
  File "game/mod/gb_mod.rpy", line 268, in execute
    fixed:
  File "game/mod/gb_mod.rpy", line 270, in execute
    bar value VariableValue("cn.aff", 100)
  File "renpy/common/00barvalues.rpy", line 283, in get_adjustment
    value = getattr(self.object, self.field)
AttributeError: 'StoreModule' object has no attribute 'cn.aff

Linux-6.8.0-50-generic-x86_64-with-debian-trixie-sid
Ren'Py 7.4.11.2266
Mon Dec 16 19:21:56 2024'
 

n00bi

Active Member
Nov 24, 2022
518
606
No idea about the api changes in 8.4 vs 7.4.
But just tossing out ideas for you.

Typo: cn.aff, Double-check for typos in aff or cn
Uninitialized Var: aff not defined, try Initialize self.aff = 0 in the constructor
Missing Object: cn not defined, Use define cn = Character("John")
Wrong Scope: Scope: Use define cn or default cn at global scope
Local Var Mistake: aff is local only, Use self.aff instead of aff
 
  • Like
Reactions: SteelyDan14

SteelyDan14

Formerly Known as GeekBone
Modder
Donor
Jan 13, 2018
1,537
6,756
For the record... it is a versioning issue. I downloaded the 7.4.11 SDK and coded it to sync with that version. All is well.
 
  • Yay, update!
Reactions: n00bi

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,423
17,389
I am assuming this error is happening because the AVN is using Renpy 7.4 while my SDK is 8.4.
*sigh*

Why the hell works on a 7.x project through a 8.x SDK?

Even more when it's a 7.4.11 Vs 8.4.0, therefore two versions separated by three years of constant development, improvement and additions. But, in the end the main issue stay that one is based on Python 2.x, while the other is based on Python 3.x that some deep syntax and behavior incompatibilities.
 
  • Haha
Reactions: n00bi