uansycio.websocket.server/example_websock.py

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
pidou46
Posts: 44
Joined: Sat May 28, 2016 7:01 pm

uansycio.websocket.server/example_websock.py

Post by pidou46 » Fri Jun 14, 2019 12:59 pm

Hi

I would like to run the example module of async version of websocket server from "https://github.com/micropython/micropyt ... websock.py" on a "esp32spiram-20190529-v1.11.bin"

It failed due to "websocket" library not available in the "server.py" module.

I haven't found "websocket" in micropython-lib directory, wher can I found it ?

Thanks
nodemcu V2 (amica)
micropython firmware Daily build 05/31/2016

User avatar
jimmo
Posts: 521
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: uansycio.websocket.server/example_websock.py

Post by jimmo » Fri Jun 14, 2019 1:43 pm

It's built-in, but it's actually called uwebsocket.

Some of the "ufoo" modules are aliased (via a weak link) to the "foo" but this doesn't appear to be the case for websocket.

Sorry I don't know if there's something I'm missing - but maybe try changing the "import websocket" to "import uwebsocket" and see if that helps?

The only other thing I know that uses websocket is webrepl, which does "import uwebsocket"

pidou46
Posts: 44
Joined: Sat May 28, 2016 7:01 pm

Re: uansycio.websocket.server/example_websock.py

Post by pidou46 » Mon Jun 17, 2019 8:00 am

Ok, thank you

I will try when at home
nodemcu V2 (amica)
micropython firmware Daily build 05/31/2016

Post Reply