CaliDog / certstream-python

Python library for connecting to CertStream
MIT License
426 stars 72 forks source link

Websocket errors #18

Closed swedishmike closed 6 years ago

swedishmike commented 6 years ago

I had some initial issues that I thought was entirely down to me and my code so I tried the example in the Readme just to have a working starting point. However, that throws errors as well. I've tried it with both Python 2.7 and 3.7 and both gives the same errors.

[ERROR:websocket] 2018-08-17 11:58:04,009 - error from callback <bound method CertStreamClient._on_open of <certstream.core.CertStreamClient object at 0x7facdeefb3d0>>: _on_open() takes exactly 2 arguments (1 given) [ERROR:websocket] 2018-08-17 11:58:04,068 - error from callback <bound method CertStreamClient._on_message of <certstream.core.CertStreamClient object at 0x7facdeefb3d0>>: _on_message() takes exactly 3 arguments (2 given) [ERROR:websocket] 2018-08-17 11:58:05,445 - error from callback <bound method CertStreamClient._on_message of <certstream.core.CertStreamClient object at 0x7facdeefb3d0>>: _on_message() takes exactly 3 arguments (2 given) [ERROR:websocket] 2018-08-17 11:58:05,482 - error from callback <bound method CertStreamClient._on_message of <certstream.core.CertStreamClient object at 0x7facdeefb3d0>>: _on_message() takes exactly 3 arguments (2 given) [ERROR:websocket] 2018-08-17 11:58:05,528 - error from callback <bound method CertStreamClient._on_message of <certstream.core.CertStreamClient object at 0x7facdeefb3d0>>: _on_message() takes exactly 3 arguments (2 given) [ERROR:websocket] 2018-08-17 11:58:05,537 - error from callback <bound method CertStreamClient._on_message of <certstream.core.CertStreamClient object at 0x7facdeefb3d0>>: _on_message() takes exactly 3 arguments (2 given)

I've tried both version 1.8 and 1.9 - just to check - and both gives the same errors under both versions of Python.

I'm still very open to it being me - but the sample code should in theory work - could there have been any changes to websocket that might need looking at from this projects code?

ghost commented 6 years ago

What version of websocket-client do you use?

swedishmike commented 6 years ago

print(websocket.version) 0.49.0

swedishmike commented 6 years ago

@wagner-certat Thanks for giving me the idea. I tested and installed websocket-client 0.48.0 and it works. It seems that version 0.49.0 that was released a couple of days ago must have changed something that breaks this.

It could be that this Pull request https://github.com/websocket-client/websocket-client/pull/462 from the websocket-client project addresses this. It looks similar but I'm not confident enough in my knowledge to say whether or not it is the same problem?

ghost commented 6 years ago

You could apply the change to your local installation and check if the problem's gone?

swedishmike commented 6 years ago

I uninstalled 0.48.0, downloaded 0.49.0 from the repo, changed according to the pull request and re-installed using python setup.py install. No dice - still the same issue. I believe my method of testing is fairly correct?

I've not seen any changelog that indicates an enforced changed behavior from the websocket-client end so I assume the issue would be there and I should close this ticket?

Now that I got the code I might try and see - low hope - if I can spot what they've changed to break this.

swisskyrepo commented 6 years ago

If anyone runs into the same problem just use the following version : websocket-client==0.48.0 certstream==1.9

jh69 commented 6 years ago

i had the same issue and the above post worked for me. created a venv and installed specifically those two versions, and things seem to be working well

Fitblip commented 6 years ago

Hey folks! Glad to see that worked. I'm going to pin the dependency then as part of the certstream-python installation so people shouldn't have to pin it themselves. Once I cut 2.0 do you folks mind helping me test this is working as expected?

Fitblip commented 6 years ago

We're live with release 1.10, please upgrade and let me know if you all have any further issues!