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

aiohttp4.0.0a1 integration error #560

Closed
Fogapod opened this issue Nov 20, 2019 · 5 comments
Closed

aiohttp4.0.0a1 integration error #560

Fogapod opened this issue Nov 20, 2019 · 5 comments

Comments

@Fogapod
Copy link

Fogapod commented Nov 20, 2019

I'm running aiohttp==4.0.0a1 and sentry-sdk==0.13.2 on python 3.8.
Each request causes the folowing exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 414, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/integrations/aiohttp.py", line 92, in sentry_app_handle
    return await asyncio.get_event_loop().create_task(inner())
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/integrations/aiohttp.py", line 66, in inner
    weak_request = weakref.ref(request)
TypeError: cannot create weak reference to 'Request' object

Was something changed in aiohttp that prevents current integration from working?

@untitaker
Copy link
Member

Possibly. We will fix this once there is a stable release of aiohttp 4 :)

@untitaker untitaker added the bug label Nov 21, 2019
@Fogapod
Copy link
Author

Fogapod commented Nov 21, 2019

Looks like this commit broke integration.
Request class uses __slots__ now and can't be weak referenced.

@untitaker
Copy link
Member

It's fine, we can work around it too. This was just useful to avoid using too much memory, we can probably hold a strong reference as well.

@untitaker
Copy link
Member

@Fogapod wow, just looked back into this... thanks for tackling this!

@Fogapod
Copy link
Author

Fogapod commented Nov 25, 2019

There is a fix in aiohttp master, it will be resolved in the next release

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