Title: Runtime.ExitError AttributeError: 'NoneType' object has no attribute 'next' · Issue #22 · aws/aws-lambda-python-runtime-interface-client · GitHub
Open Graph Title: Runtime.ExitError AttributeError: 'NoneType' object has no attribute 'next' · Issue #22 · aws/aws-lambda-python-runtime-interface-client
X Title: Runtime.ExitError AttributeError: 'NoneType' object has no attribute 'next' · Issue #22 · aws/aws-lambda-python-runtime-interface-client
Description: This is happening to me with the python:3.9-alpine3.12 base image. Here is the Dockerfile: ARG build_info="head@now" ARG build_env="development" FROM python:3.9-alpine3.12 AS base ARG build_info ARG build_env ENV PYTHONPATH=/function ENV...
Open Graph Description: This is happening to me with the python:3.9-alpine3.12 base image. Here is the Dockerfile: ARG build_info="head@now" ARG build_env="development" FROM python:3.9-alpine3.12 AS base ARG build_info AR...
X Description: This is happening to me with the python:3.9-alpine3.12 base image. Here is the Dockerfile: ARG build_info="head@now" ARG build_env="development" FROM python:3.9-alpine3.12 AS ba...
Opengraph URL: https://github.com/aws/aws-lambda-python-runtime-interface-client/issues/22
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Runtime.ExitError AttributeError: 'NoneType' object has no attribute 'next'","articleBody":"This is happening to me with the `python:3.9-alpine3.12` base image. Here is the Dockerfile:\r\n\r\n```Dockerfile\r\nARG build_info=\"head@now\"\r\nARG build_env=\"development\"\r\n\r\nFROM python:3.9-alpine3.12 AS base\r\n\r\nARG build_info\r\nARG build_env\r\n\r\nENV PYTHONPATH=/function\r\nENV BUILD_INFO=${build_info}\r\n\r\nWORKDIR /function\r\nCOPY . /function\r\n\r\nRUN apk add --no-cache --virtual .build-deps \\\r\n autoconf \\\r\n automake \\\r\n build-base \\\r\n cmake \\\r\n libcurl \\\r\n libexecinfo-dev \\\r\n libstdc++ \\\r\n libtool \\\r\n make \\\r\n postgresql-dev \\\r\n python3-dev \\\r\n \u0026\u0026 pip install --no-cache-dir -e . \\\r\n \u0026\u0026 apk del --no-cache .build-deps\r\n\r\nFROM base AS build-production\r\nRUN echo \" -\u003e Building production image\"\r\n\r\nFROM base AS build-development\r\nRUN echo \" -\u003e Building development image\" \\\r\n \u0026\u0026 apk add --no-cache \\\r\n bash \\\r\n vim \\\r\n iputils \\\r\n \u0026\u0026 pip3 install --no-cache-dir -e .[debug,testing]\r\n\r\nENV PS1=\"someapp\u003e \"\r\nENV PYTHONBREAKPOINT=ipdb.set_trace\r\n\r\nFROM build-${build_env} AS final\r\n\r\nADD https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie /usr/bin/aws-lambda-rie\r\nCOPY entry.sh /\r\nRUN chmod 755 /usr/bin/aws-lambda-rie /entry.sh\r\nENTRYPOINT [ \"/entry.sh\" ]\r\nCMD [ \"fieldeye.handler\" ]\r\n```\r\n\r\nHere's the `entry.sh`: \r\n\r\n```bash\r\n#!/bin/sh\r\n\r\nif [ -z \"${AWS_LAMBDA_RUNTIME_API}\" ]; then\r\n exec /usr/bin/aws-lambda-rie /usr/local/bin/python -m awslambdaric $1\r\nelse\r\n exec /usr/local/bin/python -m awslambdaric $1\r\nfi\r\n```\r\n\r\nand here's the error:\r\n\r\n```\r\ntime=\"2021-02-19T00:09:20.268\" level=info msg=\"exec '/usr/local/bin/python' (cwd=/function, handler=someapp.handler)\"\r\ntime=\"2021-02-19T00:09:26.44\" level=info msg=\"extensionsDisabledByLayer(/opt/disable-extensions-jwigqn8j) -\u003e stat /opt/disable-extensions-jwigqn8j: no such file or directory\"\r\nSTART RequestId: 724c1d85-78fc-4424-800e-c745e8bd51a1 Version: $LATEST\r\ntime=\"2021-02-19T00:09:26.441\" level=warning msg=\"Cannot list external agents\" error=\"open /opt/extensions: no such file or directory\"\r\nTraceback (most recent call last):\r\n File \"/usr/local/lib/python3.9/runpy.py\", line 197, in _run_module_as_main\r\n return _run_code(code, main_globals, None,\r\n File \"/usr/local/lib/python3.9/runpy.py\", line 87, in _run_code\r\n exec(code, run_globals)\r\n File \"/usr/local/lib/python3.9/site-packages/awslambdaric/__main__.py\", line 21, in \u003cmodule\u003e\r\n main(sys.argv)\r\n File \"/usr/local/lib/python3.9/site-packages/awslambdaric/__main__.py\", line 17, in main\r\n bootstrap.run(app_root, handler, lambda_runtime_api_addr)\r\n File \"/usr/local/lib/python3.9/site-packages/awslambdaric/bootstrap.py\", line 416, in run\r\n event_request = lambda_runtime_client.wait_next_invocation()\r\n File \"/usr/local/lib/python3.9/site-packages/awslambdaric/lambda_runtime_client.py\", line 76, in wait_next_invocation\r\n response_body, headers = runtime_client.next()\r\nAttributeError: 'NoneType' object has no attribute 'next'\r\nExecuting 'someapp.handler' in function directory '/function'\r\ntime=\"2021-02-19T00:09:26.604\" level=warning msg=\"First fatal error stored in appctx: Runtime.ExitError\"\r\ntime=\"2021-02-19T00:09:26.604\" level=warning msg=\"Process 13(python) exited: Runtime exited with error: exit status 1\"\r\ntime=\"2021-02-19T00:09:26.604\" level=error msg=\"Init failed\" InvokeID= error=\"Runtime exited with error: exit status 1\"\r\ntime=\"2021-02-19T00:09:26.604\" level=warning msg=\"Failed to send default error response: ErrInvalidInvokeID\"\r\ntime=\"2021-02-19T00:09:26.604\" level=error msg=\"INIT DONE failed: Runtime.ExitError\"\r\ntime=\"2021-02-19T00:09:26.604\" level=warning msg=\"Reset initiated: ReserveFail\"\r\n\r\n```\r\n\r\nJust to make sure, I ran `docker exec -it mycontainer /bin/bash` and typed `/usr/local/bin/python --version`, the response was `Python 3.9.1`","author":{"url":"https://github.com/synic","@type":"Person","name":"synic"},"datePublished":"2021-02-19T00:12:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/22/aws-lambda-python-runtime-interface-client/issues/22"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:616cbe59-608c-167d-7bb3-d2c84535c394 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AFAE:7EDCF:8D6B3C:C3046B:6A63AA8E |
| html-safe-nonce | 2afc65fe581bd491ee61f1646eab64955cd7a3f7f28ca70c5b663c8fb34856f3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkFFOjdFRENGOjhENkIzQzpDMzA0NkI6NkE2M0FBOEUiLCJ2aXNpdG9yX2lkIjoiMTkxNzg5Mjk3NzUyMTU2ODM5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9c7844535871c3c7bd30e9da391f17406af528f2c40863e50e9cdbe6a90fbc24 |
| hovercard-subject-tag | issue:811572742 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/aws/aws-lambda-python-runtime-interface-client/22/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ac3e5b8055e1d3e2161439c4ab710381adc99c2699575e7ec1da5995f0279f6c/aws/aws-lambda-python-runtime-interface-client/issues/22 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ac3e5b8055e1d3e2161439c4ab710381adc99c2699575e7ec1da5995f0279f6c/aws/aws-lambda-python-runtime-interface-client/issues/22 |
| og:image:alt | This is happening to me with the python:3.9-alpine3.12 base image. Here is the Dockerfile: ARG build_info="head@now" ARG build_env="development" FROM python:3.9-alpine3.12 AS base ARG build_info AR... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | synic |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ca676e17c4da4532dc68541e9fc874034ae840c26b5f34da7f1c42d9a600659 |
| turbo-cache-control | no-preview |
| go-import | github.com/aws/aws-lambda-python-runtime-interface-client git https://github.com/aws/aws-lambda-python-runtime-interface-client.git |
| octolytics-dimension-user_id | 2232217 |
| octolytics-dimension-user_login | aws |
| octolytics-dimension-repository_id | 292411453 |
| octolytics-dimension-repository_nwo | aws/aws-lambda-python-runtime-interface-client |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 292411453 |
| octolytics-dimension-repository_network_root_nwo | aws/aws-lambda-python-runtime-interface-client |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3a0a9f049e072eb8e5795dfddcefdba9e277501d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width