-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
The recommendation from the issue #62 doesn't help, unfortunately:
>>> Path.parse_str('$..*[?(@."@SUBST:LIST")]')
line 1:9 mismatched input '"@SUBST:LIST"' expecting {'*', ID}
Traceback (most recent call last):
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/JSONPathParser.py", line 661, in subscriptableBareword
self._errHandler.sync(self)
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/antlr4/error/ErrorStrategy.py", line 231, in sync
raise InputMismatchException(recognizer)
antlr4.error.Errors.InputMismatchException: None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/user/.conda/envs/newcheb/lib/python3.8/code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/path.py", line 88, in parse_str
return cls(_parser.parse_str(*args, **kwargs))
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/__init__.py", line 506, in parse_str
return _parse_input_stream(input_stream)
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/__init__.py", line 485, in _parse_input_stream
tree = parser.jsonpath()
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/JSONPathParser.py", line 219, in jsonpath
self.subscript()
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/JSONPathParser.py", line 425, in subscript
self.subscript()
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/JSONPathParser.py", line 447, in subscript
self.subscriptables()
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/JSONPathParser.py", line 519, in subscriptables
self.subscriptable()
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/JSONPathParser.py", line 799, in subscriptable
self.expression()
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/JSONPathParser.py", line 942, in expression
self.andExpression()
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/JSONPathParser.py", line 992, in andExpression
self.orExpression()
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/JSONPathParser.py", line 1052, in orExpression
self.notExpression()
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/JSONPathParser.py", line 1163, in notExpression
self.jsonpath__()
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/JSONPathParser.py", line 335, in jsonpath__
self.jsonpath_()
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/JSONPathParser.py", line 283, in jsonpath_
self.subscript()
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/JSONPathParser.py", line 434, in subscript
self.subscriptableBareword()
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/JSONPathParser.py", line 686, in subscriptableBareword
self._errHandler.reportError(self, re)
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/antlr4/error/ErrorStrategy.py", line 128, in reportError
self.reportInputMismatch(recognizer, e)
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/antlr4/error/ErrorStrategy.py", line 275, in reportInputMismatch
recognizer.notifyErrorListeners(msg, e.offendingToken, e)
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/antlr4/Parser.py", line 322, in notifyErrorListeners
listener.syntaxError(self, offendingToken, line, column, msg, e)
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/antlr4/error/ErrorListener.py", line 60, in syntaxError
delegate.syntaxError(recognizer, offendingSymbol, line, column, msg, e)
File "/Users/user/.conda/envs/newcheb/lib/python3.8/site-packages/jsonpath2/parser/__init__.py", line 70, in syntaxError
raise ValueError("line {}:{} {}".format(line, column, msg))
ValueError: line 1:9 mismatched input '"@SUBST:LIST"' expecting {'*', ID}
Originally posted by @bigfatbrowncat in #62 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels