Title: TypeError: string indices must be integers · Issue #2 · bennybauer/serverless-python-sample · GitHub
Open Graph Title: TypeError: string indices must be integers · Issue #2 · bennybauer/serverless-python-sample
X Title: TypeError: string indices must be integers · Issue #2 · bennybauer/serverless-python-sample
Description: Recieved from Andrea Catalucci: I’m using your serverless-python-sample git repo as a starting point for a python project, and after successfully deploying the service I am not able to call the functions through curl. I’ve followed READM...
Open Graph Description: Recieved from Andrea Catalucci: I’m using your serverless-python-sample git repo as a starting point for a python project, and after successfully deploying the service I am not able to call the fun...
X Description: Recieved from Andrea Catalucci: I’m using your serverless-python-sample git repo as a starting point for a python project, and after successfully deploying the service I am not able to call the fun...
Opengraph URL: https://github.com/bennybauer/serverless-python-sample/issues/2
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TypeError: string indices must be integers","articleBody":"Recieved from Andrea Catalucci:\r\n\r\n> I’m using your serverless-python-sample git repo as a starting point for a python project, and after successfully deploying the service I am not able to call the functions through curl.\r\n> I’ve followed README.md instructions with no problems, I can invoke both functions successfully (locally and remotely with -p event.json), but calling them through the web API doesn’t seem to work.\r\n> I constantly get: {\"message\": \"Internal server error”}\r\n> In the CloudWatch logs i see:\r\n> \r\n> string indices must be integers: TypeError\r\n> Traceback (most recent call last):\r\n> File \"/var/task/handler.py\", line 24, in get_post\r\n> url = API_HOST + '/posts/' + event['path']['id']\r\n> TypeError: string indices must be integers\r\n> \r\n> I investigated the issue, and i noticed that when calling the API with curl, the event object changes.\r\n> I analysed the json returned by jsonplaceholder.typicode.com, and I can confirm there is no event[‘path’][‘id’]; instead one should use event[‘pathParameters’][‘id’]\r\n> But even after changing that, I couldn’t make the curl command return the intended json\r\n> \r\n> Thanks for your attention,\r\n> Andrea Catalucci\r\n","author":{"url":"https://github.com/bennybauer","@type":"Person","name":"bennybauer"},"datePublished":"2017-05-07T05:50:22Z","url":"https://github.com/bennybauer/serverless-python-sample/issues/2"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:9c4170dc-e697-d39d-df37-0e3d0b5ecea1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 95F4:26E336:2CE49DE:3EA14A8:6B072296 |
| html-safe-nonce | ee12272758e170d3cf18f1fd73f8d17014599253021146f4c71add5bc0eb009e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NUY0OjI2RTMzNjoyQ0U0OURFOjNFQTE0QTg6NkIwNzIyOTYiLCJ2aXNpdG9yX2lkIjoiNDE3NDg5ODY3ODEyNzMzODEzNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a7623311b609cfa70173f1277f2f8245e668e9b20c7ccd0ca8266b4aa009fc66 |
| hovercard-subject-tag | issue:226831066 |
| 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/bennybauer/serverless-python-sample/2/issue_layout |
| twitter:image | https://opengraph.githubassets.com/149951afffd99cd8d104cda6f8701ec1ee53bd2f5b5658792150749633dda8d4/bennybauer/serverless-python-sample/issues/2 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/149951afffd99cd8d104cda6f8701ec1ee53bd2f5b5658792150749633dda8d4/bennybauer/serverless-python-sample/issues/2 |
| og:image:alt | Recieved from Andrea Catalucci: I’m using your serverless-python-sample git repo as a starting point for a python project, and after successfully deploying the service I am not able to call the fun... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bennybauer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5a20fe9aa5e45c6df9328a5ec3f167a7805856126d8bf72d810541ca01962ef9 |
| turbo-cache-control | no-preview |
| go-import | github.com/bennybauer/serverless-python-sample git https://github.com/bennybauer/serverless-python-sample.git |
| octolytics-dimension-user_id | 3007059 |
| octolytics-dimension-user_login | bennybauer |
| octolytics-dimension-repository_id | 68848649 |
| octolytics-dimension-repository_nwo | bennybauer/serverless-python-sample |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 68848649 |
| octolytics-dimension-repository_network_root_nwo | bennybauer/serverless-python-sample |
| 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 | 6ce961d9a663a99bc4bcab9fd6ac5cca54bd6fcc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width