You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM python:3.9-alpine
RUN pip install jmespath jmespath-community
COPY my-test.py .
CMD ["python", "my-test.py"]
The same code works when I just run the python file. But when run through docker, this throws these kind of errors:
File "//my-test.py", line 12, in <module>
print(jmespath.search(e1, a))
File "/usr/local/lib/python3.9/site-packages/jmespath/__init__.py", line 12, in search
return parser.Parser().parse(expression).search(data, options=options)
File "/usr/local/lib/python3.9/site-packages/jmespath/parser.py", line 88, in parse
parsed_result = self._do_parse(expression)
File "/usr/local/lib/python3.9/site-packages/jmespath/parser.py", line 96, in _do_parse
return self._parse(expression)
File "/usr/local/lib/python3.9/site-packages/jmespath/parser.py", line 109, in _parse
self._tokens = list(self.tokenizer)
File "/usr/local/lib/python3.9/site-packages/jmespath/lexer.py", line 107, in tokenize
raise LexerError(lexer_position=self._position,
jmespath.exceptions.LexerError: Bad jmespath expression: Unknown token +:
z + x
Is there something we are doing wrong? because the same code works on local, but not when deployed to a server through docker.
The text was updated successfully, but these errors were encountered:
So this is my file:
Also this is my docker file:
The same code works when I just run the python file. But when run through docker, this throws these kind of errors:
Is there something we are doing wrong? because the same code works on local, but not when deployed to a server through docker.
The text was updated successfully, but these errors were encountered: