OSError: [Errno 202] EAI_FAIL
-
Hi
i'm trying to use the urequests module that i found here : https://github.com/micropython/micropython-lib/blob/master/urequests/urequests.py
but i've got an error :
In the MAIN.py i use a firebase module where all starts

the FIREBASE.py file

the UREQUEST file


-
The EAI_FAIL is related to not being able to resolve the DNS. This means that, for whichever network you are using, the nameserver (like google.com) cannot be resolved to an IP address because the DNS server cannot be reached. This is thus related to the network not being connected to the internet, or the DNS server is not set correctly.
If you are using a pycom vodafone simcard over a NB-IoT connection, this is an expected result, as the simcards are only meant for connections to pybytes.
You can check the DNS server setting through using
import socket; socket.dnsserver()Let me know
Gijs -
I don't use pycom vodafone.
i'm working with the wipy3 and i connect it to internet through the wifi.i'm going to check the DNS server
i'll come back -
-
Do you wait in the
boot.pyuntil the connection is established, or simply usewlan.connect(...)and then end the file?
As far as I know, the statement you mention should be true, and the connection you made in theboot.pyfile should hold.
You should be able to test this though, through usingfrom network import WLAN wlan = WLAN() print(wlan.isconnected())in the
main.pyto test if we are connected to a wifi network. If this returns false, there is no connection. This should also holdTrueif the connection was created in previous 'session' that you ctrl+c'd out of, which is, to my understanding, very similar to the transfer betweenboot.pyandmain.py.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login