rleap-project/dlplan

Missing argument in Python generator example

Closed this issue · 1 comments

When running examples/generator/generator.py, the following error occurred

File "/dlplan/examples/generator/generator.py", line 79, in main
    features = generator.generate(f, 5, 5, 10, 10, 180, 100000, 1, states)
TypeError: generate(): incompatible function arguments. The following argument types are supported:
    1. (self: _dlplan.FeatureGenerator, arg0: _dlplan.SyntacticElementFactory, arg1: int, arg2: int, arg3: int, arg4: int, arg5: int, arg6: int, arg7: int, arg8: int, arg9: List[_dlplan.State]) -> List[str]

Invoked with: <_dlplan.FeatureGenerator object at 0x7ffb38c6b1f0>, <_dlplan.SyntacticElementFactory object at 0x7ffb38c504f0>, 5, 5, 10, 10, 180, 100000, 1, [{on(a,b), ontable(b), clear(a), arm-empty()}, {on(b,a), ontable(a), clear(b), arm-empty()}, {ontable(a), ontable(b), clear(a), clear(b), arm-empty()}, {ontable(b), holding(a), clear(b)}, {ontable(a), holding(b), clear(a)}]

This was fixed by using the same arguments as in examples/generator/generator.cpp.

fixed the example.