pycom / pycom-micropython-sigfox

A fork of MicroPython with the ESP32 port customized to run on Pycom's IoT multi-network modules.
MIT License
198 stars 167 forks source link

AttributeError: 'poll' object has no attribute 'ipoll' #153

Closed donikuy closed 6 years ago

donikuy commented 6 years ago

I am using a WIPY 3.0 on a WIPY 3.0. MicroPython v1.8.6-849-83e2f7f on 2018-03-19; WiPy with ESP32

When I try to use uasyncio module i get the following error:

Traceback (most recent call last): File "main.py", line 80, in File "asyncio_priority.py", line 128, in run_forever File "uasyncio/init.py", line 69, in wait AttributeError: 'poll' object has no attribute 'ipoll' MicroPython v1.8.6-849-83e2f7f on 2018-03-19; WiPy with ESP32

Would anyone be able to explain this error please?

Thank you!

Sympatron commented 6 years ago

That's because poll.ipoll() is not implemented in the Pycom fork of MicroPython.

Your easiest option is probably to change the uasyncio source to use poll.poll() instead. It is basically the same but less memory efficient. But since the WiPy3 has 4MB RAM it shouldn't be a problem for you.

donikuy commented 6 years ago

Thank you. I have changed it. I think I was also getting confused because my software reaches loop.run_forever(), but doesn't seem to run anything, does not even go to the first task.

donikuy commented 6 years ago

Seems to get stuck in that loop:

Traceback (most recent call last): File "main.py", line 59, in File "asyncio_priority.py", line 128, in run_forever File "uasyncio/init.py", line 73, in wait

husigeza commented 6 years ago

Hello, uasyncio support among with the ipoll() added in development version 1.19.0.b4 thus closing this issue.