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
Pycharm lambda debug on docker container fail with SyntaxError: Non-UTF-8 code starting with '\x96' in file /var/lang/bin/python3.9 #3609
Comments
Can you confirm that your source files are using the UTF-8 encoding? |
@rli Yes, all my source files are utf-8.
|
Same setup, same issue |
I am unable to reproduce this. Could you share a source file that has the bare minimum needed to reproduce this error? |
@viktor-zinchenko This actually helped! Thank you so much, I've been on this for a long time |
Hey there!
I'm trying to debug an aws lambda which runs on a docker container using pycharm and aws toolkit. for some reason, only when trying to DEBUG I get this error (on Run everything works well):
SyntaxError: Non-UTF-8 code starting with '\x96' in file /var/lang/bin/python3.9 on line 2, but no encoding declared; see https://python.org/dev/peps/pep-0263/ for details
time="2023-03-22T12:28:18.304" level=error msg="Init failed" InvokeID= error="Runtime exited with error: exit status 1"
I've tried adding to my docker file these lines which didn't help:
RUN yum install glibc-all-langpacks
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
I've also tried adding to my app.py file which didn't help:
I tried to contact Pycharm support but they told me that since it's a 3rd party plugin I need to contact AWS for help.
template.yaml:
dockerfile:
output:
Environment
The text was updated successfully, but these errors were encountered: