Skip to content

AttributeError: 'str' object has no attribute 'get' - wrapper.py #295

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

Closed
bissli82 opened this issue Jan 19, 2023 · 1 comment
Closed

AttributeError: 'str' object has no attribute 'get' - wrapper.py #295

bissli82 opened this issue Jan 19, 2023 · 1 comment
Assignees

Comments

@bissli82
Copy link

bissli82 commented Jan 19, 2023

Expected Behavior

Hi all,@joeyzhao2018 , I'm getting a few error messages coming from the wrapper.py,
It comes as info and not as an error, that's my guess to why it was missed for awhile.
I assume this is because our lambda function returns as string and not an object(json?) which the extension expect so self.response is an str.

I think the issue was introduced by this PR

image

Actual Behavior

Steps to Reproduce the Problem

As far as I can see, any lambda run which returns a string

Specifications

  • Datadog Lambda Layer version: 35
  • Python version: 3.9

Stacktrace

File "/opt/python/lib/python3.9/site-packages/datadog_lambda/wrapper.py", line 281, in _after
and self.response.get("principalId")
AttributeError: 'str' object has no attribute 'get'
@joeyzhao2018 joeyzhao2018 self-assigned this Jan 19, 2023
@joeyzhao2018
Copy link
Contributor

joeyzhao2018 commented Jan 24, 2023

Merged a fix (#296). Please use version ^67

@astuyve astuyve closed this as completed Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants