-
-
Notifications
You must be signed in to change notification settings - Fork 24
AttributeError when using aiohttp #116
Comments
Thanks for the report - unfortunately, I can't reproduce this failure. Firstly, because it looks like you've trimmed a little too much from your reproduction example - it can't work as written because main isn't declared
Even then, on Python 3.11 on Fedora 38, it works fine for me on multiple runs. The one detail you didn't include in your bug report was the version of gbulb you are using; is it possible you're running an older gbulb version that didn't have Python 3.11 support? |
Note to self: don't review tickets before the coffee kicks in. I just realised I didn't test this against gbulb - I was just running it a virtual environment that had gbulb installed. Apologies for the confusion; I'll take a second look. |
I can now confirm I see this, but only on Python 3.11. The test case is:
|
Just ran into the same issue here (downgrading to python3.10 does indeed fix it). To add a few more details: Looks like gbulb does not know how to deal with BufferedProtocol, which were added in 3.7, but it doesn't look like there were used in python's stdlib until 3.11, when SSLProtocol became a BufferedProtocol (python/cpython@13c10bf). ...ok, couldn't resist. It's really ugly, but it seems to work: odahoda@06c71af |
The PR #60 does indeed look like the proper fix, though I can't test it easily, because the branch is outdated and missing other py3.11 related fixes... |
So... I'm interested in this bug, how can I help you testing this issue? I'm in this situation with a simple WebSocket connection, but... reading this conversation I think we can check a "patch". Anyway, I have currently in my project this problem, so "I'm able to reproduce this issue". Regarding your comments, to clarify other developers, I saw that this bug is not present in python < 3.11. |
The testing strategy is to set up an environment and install the code from the PR branch, then see if it resolves the issue. The follow-up problem is that the neither the current codebase or the PR contains any tests that demonstrates the problem that has been reported. We need to add a test case that exercises the problematic code. |
But... I see that this PR should have been tested 2 years before, it's not simple, there are a lot of incompatibilities with the current version. It needs more work than a simple checkout to be checked. I see the error, and apparently, the author of the PR made a good work because apparently, creates the protocol and solves the missing arguments than appears in the error:
Anyway, 2 years before... it's not a simple python version upgrade of our system, this error is happening too much time before. About the tests... I understand that your tests are not failing, and I see why. In my project, I have added and launched a bug.py with the code and a |
I have applied a "merge" manually with the PR, and, at least for me, it didn't solve the situation. So... need more work to be solved :'( |
Describe the bug
When doing a GET request from aiohttp, console shows AttributeError. The error doesn't happen when using aiohttp outside of gbulb.
Steps to reproduce
Expected behavior
Success.
Screenshots
No response
Environment
Ubuntu, Python 3.11
Logs
Additional context
No response
The text was updated successfully, but these errors were encountered: