pddl-lib icon indicating copy to clipboard operation
pddl-lib copied to clipboard

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

Open gautierdag opened this issue 2 years ago • 5 comments

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)

gautierdag avatar Sep 20 '22 11:09 gautierdag

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

Martin36 avatar Oct 30 '22 10:10 Martin36

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.

hfoffani avatar Oct 30 '22 13:10 hfoffani

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

YaqiXie avatar Dec 17 '22 06:12 YaqiXie

Also getting the bug on my end

Fredrikhb avatar Mar 31 '23 15:03 Fredrikhb

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.

hfoffani avatar Apr 09 '23 16:04 hfoffani