Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'antlr4.LL1Analyzer' in v0.4.5 #58

Open
abdulr4uf opened this issue Jun 28, 2022 · 2 comments
Open

Comments

@abdulr4uf
Copy link

jsonpath2 version

0.4.5

Platform Details

Red_Hat_Enterprise_Linux 7
python3.9

Scenario:

parse_str in Path Class of jsonpath2.path is giving ModuleNotFoundError

from jsonpath2.path import Path
json_path = "$.runLogId"
parsed_path = Path.parse_str(json_path)

File "venv/lib64/python3.9/site-packages/jsonpath2/path.py", line 88, in parse_str
File "venv/lib64/python3.9/site-packages/jsonpath2/parser/init.py", line 506, in parse_str
File "venv/lib64/python3.9/site-packages/jsonpath2/parser/init.py", line 485, in _parse_input_stream
File "venv/lib64/python3.9/site-packages/jsonpath2/parser/JSONPathParser.py", line 215, in jsonpath
File "venv/lib64/python3.9/site-packages/antlr4/error/ErrorStrategy.py", line 212, in sync
File "venv/lib64/python3.9/site-packages/antlr4/atn/ATN.py", line 71, in nextTokens
File "venv/lib64/python3.9/site-packages/antlr4/atn/ATN.py", line 65, in nextTokensNoContext
File "venv/lib64/python3.9/site-packages/antlr4/atn/ATN.py", line 55, in nextTokensInContext
ModuleNotFoundError: No module named 'antlr4.LL1Analyzer'

Steps to Reproduce:

basic parsing

Expected Result:

Should return a parsed string to match with the json

Actual Result:

ModuleNotFoundError: No module named 'antlr4.LL1Analyzer'

@dmlb2000
Copy link
Member

dmlb2000 commented Jul 1, 2022

@abdulr4uf I did a review of the pipeline to verify we are testing python 3.9 and ran a recent (just now) pipeline. So, I'm thinking this has something to do with your installation of Python 3.9 on EL7. Did you build Python from scratch? Did you get Python from a third party repo?

@abdulr4uf
Copy link
Author

Python was fetched from the organizational repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants