adafruit / Adafruit_CircuitPython_HTTPServer

Simple HTTP Server for CircuitPython
MIT License
46 stars 30 forks source link

Does this work on Pico W? Having trouble installing/importing socketpool #14

Closed sgbaird closed 2 years ago

sgbaird commented 2 years ago
import socketpool
> ImportError: no module named 'socketpool'
(circuitpython) PS D:\> circup install socketpool
Found device at D:\, running CircuitPython 7.3.2.
Searching for dependencies for: ['socketpool'] 
WARNING:
        socketpool is not a known CircuitPython library.
Neradoc commented 2 years ago

Hi, the pico W is not supported in Circuitpython. Its wifi modules requires additional work to be supported. Follow this issue to know when it is: https://github.com/adafruit/circuitpython/issues/6558

justbuchanan commented 2 years ago

The latest beta (8.0) of circuitpython now includes support for wifi/socketpool on the pico w. I was able to get adafruit_httpserver to work, but had to change the socket from non-blocking to blocking.

Change False to True here:

https://github.com/adafruit/Adafruit_CircuitPython_HTTPServer/blob/ba2da4352290b880592ae5ab5db83ee50c045244/adafruit_httpserver.py#L334