Bug with CardGame.py markers?

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
User avatar
Queex
Regular
Posts: 46
Joined: Sat Mar 14, 2015 9:47 am
Contact:

Bug with CardGame.py markers?

#1 Post by Queex »

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 420, in script call
    call prologue_fixer_2
  File "game/script.rpy", line 678, in script
    python:
  File "game/script.rpy", line 688, in <module>
    ("E",0,0,0),("E",1,0,0),("E",2,0,0)))
  File "game/fixer.rpy", line 114, in add_components
    self.add_component(tup[0],tup[1],tup[2],tup[3])
  File "game/fixer.rpy", line 101, in add_component
    t.add_marker((component,x,y),self.fixer_numbers[int(component.split(":")[1])])
  File "game/cardgame.rpy", line 165, in add_marker
    self.get_card(card).markers.append(marker)
AttributeError: '_m1_cardgame__Card' object has no attribute 'markers'

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

Full traceback:
  File "game/script.rpy", line 420, in script call
    call prologue_fixer_2
  File "game/script.rpy", line 678, in script
    python:
  File "E:\renpy-6.18.3-sdk\renpy\ast.py", line 785, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "E:\renpy-6.18.3-sdk\renpy\python.py", line 1382, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/script.rpy", line 688, in <module>
    ("E",0,0,0),("E",1,0,0),("E",2,0,0)))
  File "game/fixer.rpy", line 114, in add_components
    self.add_component(tup[0],tup[1],tup[2],tup[3])
  File "game/fixer.rpy", line 101, in add_component
    t.add_marker((component,x,y),self.fixer_numbers[int(component.split(":")[1])])
  File "game/cardgame.rpy", line 165, in add_marker
    self.get_card(card).markers.append(marker)
AttributeError: '_m1_cardgame__Card' object has no attribute 'markers'

Windows-7-6.1.7601-SP1
Ren'Py 6.18.3.761
Adrift 0.3
It seems as though the marker list is never declared for the __Card class in CardGame.py. The only parts referencing the markers attribute in the Table class are:

Code: Select all

        def add_marker(self, card, marker):
             self.get_card(card).markers.append(marker)
             renpy.redraw(self, 0)

        def remove_marker(self, card, marker):
            self.get_card(card).markers.remove(marker)
            renpy.redraw(self, 0)
There is, however, a highlights list declared for __Card and used in the rendering code. I think the attribute's name was changed but the __Card class was never updated. Chaning highlights to markers throughout doesn't fix it, though.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Majestic-12 [Bot]