Description
Trying to execute the line of code in "Handcrafting a game.ipynb", following the table "Supported types of objects" in notebook markdown, to initiate a new "stove" object:
stove_obj = M.new(type='stove', name="stove")
This gives the following traceback:
KeyError Traceback (most recent call last)
in <cell line: 1>()
----> 1 note = M.new(type='oven', name="note") # Provide the type and the name of the object.
2 note.infos.desc = "Bravo! You can read." # Text to display when issuing command "examine note".
3
4 supporter = M.new(type='s') # When not provided, names are automatically generated.
52 frames
/usr/local/lib/python3.10/dist-packages/textworld/generator/vtypes.py in getitem(self, vtype)
179 """ Get VariableType object from its type string. """
180 vtype = vtype.rstrip("'")
--> 181 return self.variables_types[vtype]
182
183 def contains(self, vtype):KeyError: 'oven'
The same error is thrown with object type "oven". How can we extend the currently supported object types to "stove", "oven", or other new types?