Hello Sara and Rui
I am running examples from the Micropython and Pico W book.
All has worked well until section 9.2 when a request is made to “http://www.google.com”
I get the following output –
MPY: soft reboot
Traceback (most recent call last):
File “<stdin>”, line 48, in <module>
File “requests/__init__.py”, line 180, in get
File “requests/__init__.py”, line 76, in request
OSError: -2
I have checked that I have access to my wifi and have successfully connected using the previous example.
Can you offer any suggestions ie what is OSError: -2 ?
Many thanks, I am really enjoying the book.
Mike
After 4 hours of looking for error codes and trying to find the modules to see what was failing I finally found the solution.
I am running a mesh network using 3 EERO 6 devices and the solution was using ipconfig to see what the internal IP addresses were. I changed the Pico IP address from 192.168.1.100 to 192.168.4.100 and it ran correctly. What puzzles me is that I then turned off the power and ran the basic Google request and now it worked fine where previously the same program failed!