wendlers / mpfshell

A simple shell based file explorer for ESP8266 Micropython based devices ⛺
MIT License
396 stars 84 forks source link

Can't connect through ws: with websocket-client version > 0.48.0. #59

Open greblus opened 6 years ago

greblus commented 6 years ago

Hi guys.

I've been trying to use mpfshell with my Wemos D1 mini pro and noticed that it won't connect through ws: if websocket-client version is > 0.48.0.

In debug I see: 2018-09-01 10:51:36,860 ERROR error from callback <bound method ConWebsock.on_message of <ConWebsock(Thread-1, started daemon 140001679963904)>>: on_message() missing 1 required positional argument: 'message' 2018-09-01 10:51:36,964 ERROR error from callback <bound method ConWebsock.on_error of <ConWebsock(Thread-1, started daemon 140001679963904)>>: on_error() missing 1 required positional argument: 'error' 2018-09-01 10:51:37,005 ERROR error from callback <bound method ConWebsock.on_close of <ConWebsock(Thread-1, started daemon 140001679963904)>>: on_close() missing 1 required positional argument: 'ws' 2018-09-01 10:51:41,535 ERROR

merlink01 commented 5 years ago

Same Problem here.

junhuanchen commented 5 years ago

well, you can try my fork mpfshell,The author vaporized. i use ws in websocket_client ~= 0.52.0, not is websocket.

greblus commented 5 years ago

@junhuanchen: thanks, I will try shortly.

merlink01 commented 5 years ago

I testet a little bit, seems to work better.

Will there be a pull request, and someday a new pipy version???

skorokithakis commented 5 years ago

I will accept a PR for this.

xnorbt commented 4 years ago

Removing the second parameter 'ws' in on_message and on_error in conwebsock.py seems to fix the issue (at least it is working for me). I.e.: change def on_message(self, ws, message): to def on_message(self, message): Same with on_error.

skorokithakis commented 4 years ago

Fantastic, can you issue a PR that updates the dependency version and removes the parameter?

xnorbt commented 4 years ago

Which version should I put in the requirements file? I have tested it with websocket_client-0.56.0.