Skip to content

Multiple inheritance issue? #33

@ronentk

Description

@ronentk

Hi,
I tried adding the box kind (of kinds o and c) based on the example you supplied. However, it seems to be creating problems when building the logic rules (I think with the room, since it's both an object and container):

Traceback (most recent call last):

  File "<ipython-input-2-2cd076114184>", line 1, in <module>
    runfile('/home/rlvn-25/dev/ext/TextWorld/notebooks/make_example_game.py', wdir='/home/rlvn-25/dev/ext/TextWorld/notebooks')

  File "/home/rlvn-25/anaconda3/envs/textworld/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 678, in runfile
    execfile(filename, namespace)

  File "/home/rlvn-25/anaconda3/envs/textworld/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 106, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "/home/rlvn-25/dev/ext/TextWorld/notebooks/make_example_game.py", line 7, in <module>
    import textworld

  File "/home/rlvn-25/dev/ext/TextWorld/textworld/__init__.py", line 14, in <module>
    from textworld.generator import Game, GameMaker

  File "/home/rlvn-25/dev/ext/TextWorld/textworld/generator/__init__.py", line 249, in <module>
    load_data()

  File "/home/rlvn-25/dev/ext/TextWorld/textworld/generator/data/__init__.py", line 180, in load_data
    load_logic(pjoin(target_dir, "logic"))

  File "/home/rlvn-25/dev/ext/TextWorld/textworld/generator/data/__init__.py", line 134, in load_logic
    logic = GameLogic.load(paths)

  File "/home/rlvn-25/dev/ext/TextWorld/textworld/logic/__init__.py", line 1415, in load
    result._initialize()

  File "/home/rlvn-25/dev/ext/TextWorld/textworld/logic/__init__.py", line 1349, in _initialize
    self.inform7._initialize(self)

  File "/home/rlvn-25/dev/ext/TextWorld/textworld/logic/__init__.py", line 1263, in _initialize
    self._expand_predicates(logic)

  File "/home/rlvn-25/dev/ext/TextWorld/textworld/logic/__init__.py", line 1273, in _expand_predicates
    self._add_predicate(Inform7Predicate(expanded, pred.source))

  File "/home/rlvn-25/dev/ext/TextWorld/textworld/logic/__init__.py", line 1250, in _add_predicate
    raise ValueError("Duplicate Inform 7 predicate for {}".format(sig))

ValueError: Duplicate Inform 7 predicate for at(box, r)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions