hfoffani / pddl-lib

A PDDL library that parse PDDL files and provides a very simple interface to interact with domain-problems.
Apache License 2.0
82 stars 20 forks source link

lexer/parser incompatible with antlr4-python3-runtime>4.9.3 #31

Open gautierdag opened 2 years ago

gautierdag commented 2 years ago

Following the installation instruction pip install pddlpy also installs the latest version of antlr4-python3-runtime however this causes an error on import pddlpy:

    raise Exception("Could not deserialize ATN with version " + str(version) + " (expected " + str(SERIALIZED_VERSION) + ").")
Exception: Could not deserialize ATN with version  (expected 4).

Quick fix would be fixing the version of antlr4-python3-runtime in requirements.txt and setup.py, while a more long lasting solution would be to regenerate lexer/parser using the new ANTLR (see https://github.com/antlr/antlr4/issues/3753)

Martin36 commented 1 year ago

By running pip install antlr4-python3-runtime==4.9.3 it works for me

hfoffani commented 1 year ago

Thanks. There's an == in requirements.txt but not in setup.py I'll do a quick fix for it. Also thanks for pointing out the best solution (regenerate lexer/parser)

edit: I've forgot that the main branch is broken. there's no point to change setup.py. It would be better to reset HEAD to the last working version.

YaqiXie commented 1 year ago

Is this issue solved? I'm still getting this Orz

Fredrikhb commented 1 year ago

Also getting the bug on my end

hfoffani commented 1 year ago

I've just published version 0.3.4 Includes antlr 4.12.0 runtime and I assume it won't fail in the future when Antlr releases new Python interfaces. Although the parser recognizes durations they are not implemented in the pddlpy library.