Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
greblus opened this issue Sep 1, 2018 · 8 comments
Open

Comments

@greblus
Copy link

greblus commented Sep 1, 2018

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

@greblus greblus changed the title Can't connect through ws: with websocket-client version >= 0.48.0. Can't connect through ws: with websocket-client version > 0.48.0. Sep 1, 2018
@merlink01
Copy link

Same Problem here.

@junhuanchen
Copy link
Contributor

junhuanchen commented Sep 28, 2018

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

@greblus
Copy link
Author

greblus commented Sep 28, 2018

@junhuanchen: thanks, I will try shortly.

@merlink01
Copy link

I testet a little bit, seems to work better.

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

@skorokithakis
Copy link
Collaborator

I will accept a PR for this.

@xnorbt
Copy link
Contributor

xnorbt commented Nov 26, 2019

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
Copy link
Collaborator

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

@xnorbt
Copy link
Contributor

xnorbt commented Nov 26, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants