8000 Getting "Repeated socket failures" on PicoW · Issue #126 · adafruit/Adafruit_CircuitPython_Requests · GitHub
[go: up one dir, main page]

Skip to content
Getting "Repeated socket failures" on PicoW #126
Closed
@matoushybl

Description

@matoushybl

Hi,
I am trying to use this library on a Pico W with CircuitPython 8.0.0 beta 6 and I also tried nightly. The problem is that most of the time, I am getting "OutOfRetries: Repeated socket failures" when trying to GET basic URLs. The code is as follows:

import os
import time
import ssl
import wifi
import socketpool
import adafruit_requests

quotes_url = "http://wifitest.adafruit.com/testwifi/index.html"

wifi.radio.connect(os.getenv('CIRCUITPY_WIFI_SSID'), os.getenv('CIRCUITPY_WIFI_PASSWORD'))

pool = socketpool.SocketPool(wifi.radio)
requests = adafruit_requests.Session(pool, ssl.create_default_context())

print("Fetching text from %s" % quotes_url)
response = requests.get(quotes_url)
print("-" * 40)
print("Text Response: ", response.text)
print("-" * 40)
response.close()

The output is:

Fetching text from http://wifitest.adafruit.com/testwifi/index.html
Traceback (most recent call last):
  File "code.py", line 80, in <module>
  File "adafruit_requests.py", line 721, in get
  File "adafruit_requests.py", line 686, in request
OutOfRetries: Repeated socket failures

Randomly, the request is ok, but after rerunning the code it fails. Power cycling the board doesn't work and I've tried multiple APs.

Can you please give me any pointers on how to debug this problem?
Thanks!

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

      0