Skip to content

httpserver simpletest fails (cp9 on Pico W) #9081

@studiostephe

Description

@studiostephe

CircuitPython version

dafruit CircuitPython 9.0.0 on 2024-03-19; Raspberry Pi Pico W with rp2040

Code/REPL

import socketpool
import wifi

from adafruit_httpserver import Server, Request, Response

ssid = "Unintended Consequences"
password = "xxxx"

print("Connecting to", ssid)
wifi.radio.connect(ssid, password)
print("Connected to", ssid)

pool = socketpool.SocketPool(wifi.radio)
server = Server(pool, "/static", debug=True)


@server.route("/")
def base(request: Request):
    """
    Serve a default static plain text message.
    """
    return Response(request, "Hello from the CircuitPython HTTP Server!")


server.serve_forever(str(wifi.radio.ipv4_address))

Behavior

code.py output:
Connecting to Unintended Consequences
Connected to Unintended Consequences
Traceback (most recent call last):
File "code.py", line 25, in
File "adafruit_httpserver/server.py", line 185, in serve_forever
File "adafruit_httpserver/server.py", line 228, in start
File "adafruit_httpserver/server.py", line 207, in _create_server_socket
OSError: [Errno 95] EOPNOTSUPP

Description

Test code taken from first example here: https://docs.circuitpython.org/projects/httpserver/en/latest/examples.html

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy