Skip to content

Sending Requests Failed on second network call in CircuitPython 7.0.0 #5538

Closed
@makermelissa

Description

@makermelissa

This was originally found by a user in the forums at https://forums.adafruit.com/viewtopic.php?f=19&t=184484&p=895677. I was able to reproduce the issue by following the guide at https://learn.adafruit.com/magtag-google-calendar-event-display.

Here's the stack trace

Traceback (most recent call last):
File "code.py", line 246, in <module>
File "code.py", line 84, in get_current_time
File "adafruit_portalbase/__init__.py", line 411, in get_local_time
File "adafruit_portalbase/network.py", line 231, in get_local_time
File "adafruit_portalbase/network.py", line 200, in get_strftime
File "adafruit_requests.py", line 613, in get
File "adafruit_requests.py", line 554, in request
File "adafruit_requests.py", line 423, in _get_socket
RuntimeError: Sending request failed

After making is so get_local_time was only called once, it failed on the next network call with this stack trace:

Traceback (most recent call last):
  File "code.py", line 227, in <module>
  File "adafruit_oauth2.py", line 179, in refresh_access_token
  File "adafruit_requests.py", line 617, in post
  File "adafruit_requests.py", line 554, in request
  File "adafruit_requests.py", line 423, in _get_socket
RuntimeError: Sending request failed

The first call is successful, but any subsequent calls fail. This only happens in CircuitPython 7.0.0 and not 6.3.0. I have not tried any of the alpha, beta, or release candidate versions in between.

Note: This issue may need to be moved to the CircuitPython repo

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions