-
Notifications
You must be signed in to change notification settings - Fork 551
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
'coroutine' object is not iterable #122
Comments
I forgot if I met this problem, but I guess the build script about uvloop
has some problems because I rewrite the Arch pkgbuild about uvloop and
fixed some problems like yours
Alex Kuzmenko <notifications@github.com> 于 2017年12月6日周三 17:01写道:
…
- *uvloop version*: 0.9.1
- *Python version*: 3.6
- *Platform*: Ubuntu Xenial
Version 0.9.1:
I got an error
File "/app/app/<***>/utils.py", line 35, in <***>
async with app['client_session'].get(url) as response:
File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 690, in __aenter__
self._resp = yield from self._coro
File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 267, in _request
conn = yield from self._connector.connect(req)
File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 402, in connect
proto = yield from self._create_connection(req)
File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 748, in _create_connection
_, proto = yield from self._create_direct_connection(req)
File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 831, in _create_direct_connection
req=req, client_error=client_error)
File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 796, in _wrap_create_connection
return (yield from self._loop.create_connection(*args, **kwargs))
TypeError: 'coroutine' object is not iterable
Version 0.8.1:
Not reproduced
The error does not depend on other libraries.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#122>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJoPKUG3ZBQ4l1ck6TYOBd86OcJwziOsks5s9lfigaJpZM4Q3kuJ>
.
|
Did you install uvloop via pip? Do you use any other packages that are compiled with Cython? |
yes, we use pip. and we have other packages (compiled with Cython) (for example: |
I get the same with Python 3.6 (stock cpython, Ubuntu 17.10) with a pip-installed uvloop |
Another bump here with Python 3.6 on Ubuntu as well. |
Same here. (Python 3.6.4, Ubuntu 17.10) |
I facing this problem too, using aiohttp, any workaround? Snippet of my code:
|
I suspect that the bug is in Cython. Waiting for its next release to fix things. |
Have observed the same problem in our production code. I was unable to pin down the minimal reproducible test case unfortunately. |
I'm having the exact same issue on my project, in this case when creating an asyncio_redis connection. It only happens if I import BeautifulSoup at the module level (so it was already imported before calling loop.create_connection()). I'm importing it at the function level as a workaround. |
I have this issue too with aiohttp |
Again, it looks like this is a regression in Cython. Try installing earlier uvloop versions, we'll fix it with the next Cython release. |
A new |
I have the same issue using uvloop 0.9.1 in python 3.5.2 with asyncio create_subprocess_exec. I hope this will be fixed soon! |
uvloop version: 0.9.1 |
Cython 0.28 and 0.28.1 which includes the required patch is released now. 🎉 |
Use new @cython.iterable_coroutine instead of patching the generated C code. Fixes issue #122.
Fixed in master. Please test :) |
I keep having this issue. I am using the latest |
Not sure. Most likely it's unrelated to uvloop. I suggest debugging the line that causes this exception. |
In case someone else gets this error message, just convert to async def / await ... that fixed the issue for me.
|
Version 0.9.1:
I got an error
Version 0.8.1:
Not reproduced
The error does not depend on other libraries.
The text was updated successfully, but these errors were encountered: