-
Notifications
You must be signed in to change notification settings - Fork 79
Runtime.ExitError AttributeError: 'NoneType' object has no attribute 'next' #22
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
Comments
Figured it out, it's because I'm installing RUN apk add --no-cache \
libstdc++ \
libpq \
&& apk add --no-cache --virtual .build-deps \
autoconf \
automake \
build-base \
cmake \
libcurl \
libexecinfo-dev \
libtool \
make \
musl-dev \
postgresql-dev \
python3-dev \
&& pip install --no-cache-dir -e . \
&& apk del --no-cache .build-deps
|
By the way, I was able to find out why it wasn't working by looking at the code, specifically this line: https://github.com/aws/aws-lambda-python-runtime-interface-client/blob/main/awslambdaric/lambda_runtime_client.py#L31 try:
import runtime_client
runtime_client.initialize_client(_user_agent())
except ImportError:
runtime_client = None # THIS LINE HERE Then, I just opened a python shell and typed I don't know that it's good that it just silently fails on the import there. Is there a reason to believe the library can work when |
I've had the same issue, but with |
I had the same issue and had to do the same step as @synic to figure out the cause. In my case, the missing dependency was resolved by installing curl. I would remove except ImportError clause or at least document which dependencies are required by awslambdaric to be installed. |
This worked for me. |
For me it was
This was a really annoying issue, and there was no way to identify the cause without additional logging. I have opened a PR and am waiting for guidance about the proper way to log this. Here's the full Dockerfile if interested:
|
Hey, I was able to build a working image by installing thesse deps on the runtime stage: |
This is happening to me with the
python:3.9-alpine3.12
base image. Here is the Dockerfile:Here's the
entry.sh
:and here's the error:
Just to make sure, I ran
docker exec -it mycontainer /bin/bash
and typed/usr/local/bin/python --version
, the response wasPython 3.9.1
The text was updated successfully, but these errors were encountered: