IBM / nl2flow

NL2Flow: A PDDL Interface to Flow Construction
Apache License 2.0
5 stars 2 forks source link

Kstar bug on empty plans #7

Closed TathagataChakraborti closed 4 months ago

TathagataChakraborti commented 4 months ago

Kstar errors out when there are no plans

../../nl2flow/plan/planners.py:64: in plan
    result = planners.plan_unordered_topq(
../../../miniconda3/envs/lemming/lib/python3.10/site-packages/kstar_planner/planners.py:47: in plan_unordered_topq
    return run_planner(planner_args)
../../../miniconda3/envs/lemming/lib/python3.10/site-packages/kstar_planner/planners.py:25: in run_planner
    data = json.load(plans_file)
../../../miniconda3/envs/lemming/lib/python3.10/json/__init__.py:293: in load
    return loads(fp.read(),
../../../miniconda3/envs/lemming/lib/python3.10/json/__init__.py:346: in loads
    return _default_decoder.decode(s)
../../../miniconda3/envs/lemming/lib/python3.10/json/decoder.py:337: in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())

🩹 I have temporarily put a try catch here.

ctpelok77 commented 4 months ago

@TathagataChakraborti please add the input files and your call

TathagataChakraborti commented 4 months ago

Any unsolvable instance will do. I have added one here. Basically its trying to read a JSON from an empty string coz no plans got written out.

ctpelok77 commented 4 months ago

Should be fixed in version 1.4.0. Please test @TathagataChakraborti

TathagataChakraborti commented 4 months ago

Solved 🤗