Reputation: 71
I have been using uasyncio on ESP32-WROOM-32D. After all the testing, I am trying to use the firmware to my other boards but uasyncio is not installed by default with the micropython. I tried to install the package by
>rshell -p comX
>repl
>>> import upip
>>> upip.install('micropython-uasyncio')
but getting the following error:
Installing to: /lib/
Error installing 'micropython-uasyncio': list index out of range, packages may be partially installed
Please help!
Upvotes: 3
Views: 875
Reputation: 3693
This is most likely a network error. I traced the same error and found that usocket.getaddrinfo
failed to return a sensible address, leading to a list out of range exception in the upip module (https://github.com/micropython/micropython/blob/master/tools/upip.py#L136).
Check your network configuration using:
import network
network.WLAN(network.STA_IF).ifconfig()
If settings are not correct, make sure you have reasonable settings by calling ifconfig with a tuple of 4 addresses (ip, mask, gateway, dns):
network.WLAN(network.STA_IF).ifconfig(("192.168.1.101", "255.255.255.0", "192.168.1.1", "8.8.8.8"))
Upvotes: 1