Skip to content

AttributeError: 'generator' object has no attribute 'pend_throw' #244

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
fadushin opened this issue Dec 31, 2017 · 3 comments
Closed

AttributeError: 'generator' object has no attribute 'pend_throw' #244

fadushin opened this issue Dec 31, 2017 · 3 comments

Comments

@fadushin
Copy link

As of commit 203cc48, I am getting an error in uasyncio.core (line 107) when using the uhttpd library. I have added two print lines for ret and cb, so the error is on actually line 107 as of that commit.

FDUSHIN> ret: <IORead object at 3fff6a10>
FDUSHIN> cb: <generator object 'start_server' at 3fff77d0>
Traceback (most recent call last):
File "main.py", line 14, in
File "neolamp/init.py", line 60, in run
File "uhttpd/init.py", line 70, in run
File "uhttpd/init.py", line 407, in run
File "uasyncio/core.py", line 140, in run_forever
File "uasyncio/core.py", line 109, in run_forever
AttributeError: 'generator' object has no attribute 'pend_throw'

I don't know how esoteric my usage of uasyncio.start_server is -- I am passing in a locally defined function, which is annotated with @asyncio.coroutine:

https://github.com/fadushin/esp8266/blob/master/micropython/uhttpd/uhttpd/__init__.py#L401

If you like, I can try to provide a simpler test case. I would not be surprised if I am abusing the library in some way.

Thank you!

@pfalcon
Copy link
Contributor

pfalcon commented Jan 6, 2018

You need the latest micropython from https://github.com/pfalcon/micropython for the latest uasyncio.

Search for more info: https://github.com/micropython/micropython-lib/search?q=pend_throw&type=Issues&utf8=%E2%9C%93

@pfalcon pfalcon closed this as completed Jan 6, 2018
@pfalcon
Copy link
Contributor

pfalcon commented Jan 6, 2018

Actually, that's indeed a problem, a notice was posted on the forum: https://forum.micropython.org/viewtopic.php?f=15&t=85&p=24415#p24415

@fadushin
Copy link
Author

fadushin commented Jan 8, 2018

Thank you!

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

2 participants