Skip to content
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

NoneType object has no attribute settings #786

Closed
erry-takumi opened this issue Mar 21, 2023 · 1 comment · Fixed by #787
Closed

NoneType object has no attribute settings #786

erry-takumi opened this issue Mar 21, 2023 · 1 comment · Fixed by #787

Comments

@erry-takumi
Copy link

Description
NOTE: # ( Describe the problem you're encountering. )
[TIP]: # ( Do NOT share sensitive information, whether personal, proprietary, or otherwise! )

This broke our production build. Not every, but lots of requests failed due to newrelic framework_graphql

AttributeError: 'NoneType' object has no attribute 'settings'
File "promise/promise.py", line 87, in try_catch
return (handler(*args, **kwargs), None)
File "graphql/execution/executor.py", line 127, in promise_executor
return execute_operation(exe_context, exe_context.operation, root_value)
File "newrelic/hooks/framework_graphql.py", line 108, in wrap_execute_operation
settings = transaction.settings

Expected Behavior
NOTE: # ( Tell us what you expected to happen. )

It doesn't crash :)

Troubleshooting or NR Diag results
NOTE: # ( Provide any other relevant log data. )
[TIP]: # ( Scrub logs and diagnostic information for sensitive information )

Steps to Reproduce
NOTE: # ( Please be as specific as possible. )
[TIP]: # ( Link a sample application that demonstrates the issue. )
Any graphql query

Your Environment
[TIP]: # ( Include as many relevant details about your environment as possible including the running version of New Relic software and any relevant configurations. )

newrelic 8.7.1 (This did NOT happen on 8.7.0)
graphene 2.1.6

Additional context
[TIP]: # ( Add any other context about the problem here. For example, relevant community posts or support tickets. )

I know We're on an old version of graphene, but still, one would hope patch version upgrades don't have breaking changes 🤣

@TimPansino
Copy link
Contributor

Hello @erry-takumi, sorry about that. I've opened a PR to guard that settings lookup to prevent this. If you back down to 8.7.0 for the time being you shouldn't see any issues. We'll put a patch version out to address this as soon as we can.

@mergify mergify bot closed this as completed in #787 Mar 30, 2023
@TimPansino TimPansino added this to the v8.8.0 milestone Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants