Skip to content

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

Closed

Description

@fadushin

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!

Activity

  1. pfalcon commented on Jan 6, 2018

    @pfalcon
    Contributor
  2. pfalcon commented on Jan 6, 2018

    @pfalcon
    Contributor

    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

  3. fadushin commented on Jan 8, 2018

    @fadushin
    Author

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions