Skip to content
New issue

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

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

Already on GitHub? # to your account

ws4py broken using cherrypy>=11.1.0 #235

Closed
matt-hammond-001 opened this issue Nov 23, 2017 · 5 comments
Closed

ws4py broken using cherrypy>=11.1.0 #235

matt-hammond-001 opened this issue Nov 23, 2017 · 5 comments

Comments

@matt-hammond-001
Copy link

ws4py appears to be broken when using latest ws4py and cherrypy>=11.1.0 (installed via pip). Specifically I'm using python 2.7 and I've got these package versions installed:

  • ws4py==0.4.2
  • cheroot==5.9.1

I've tested with CherryPy==

  • Works: 10.2.1 | 10.2.2 | 11.0.0
  • Broken: 11.1.0 | 11.2.0 | 12.0.0 | 12.0.1

When running the simple server example I get the following error when I make a websocket connection to this server:

127.0.0.1 - - [23/Nov/2017:14:58:23] "GET /ws HTTP/1.1" 101 - "" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0"
[23/Nov/2017:14:58:23] ENGINE AttributeError("'NoneType' object has no attribute 'recv'",)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cheroot/server.py", line 1112, in communicate
    req.parse_request()
  File "/usr/local/lib/python2.7/dist-packages/cheroot/server.py", line 638, in parse_request
    success = self.read_request_line()
  File "/usr/local/lib/python2.7/dist-packages/cheroot/server.py", line 676, in read_request_line
    request_line = self.rfile.readline()
  File "/usr/local/lib/python2.7/dist-packages/cheroot/server.py", line 233, in readline
    data = self.rfile.readline(256)
  File "/usr/local/lib/python2.7/dist-packages/cheroot/makefile.py", line 233, in readline
    data = self.recv(self._rbufsize)
  File "/usr/local/lib/python2.7/dist-packages/cheroot/makefile.py", line 87, in recv
    data = self._sock.recv(size)
AttributeError: 'NoneType' object has no attribute 'recv'
@matt-hammond-001 matt-hammond-001 changed the title ws4py broken using cherrypy 12.0.1 and cheroot 5.9.1 ws4py broken using cherrypy>=11.1.0 Nov 23, 2017
@noam-graetz
Copy link
Contributor

i have identified and fixed the problem... currently pending (pull request #236 ).

@matt-hammond-001
Copy link
Author

matt-hammond-001 commented Dec 11, 2017

@noam-graetz - many thanks. Have just verified that this does seem to fix the issue I was seeing.

@noam-graetz
Copy link
Contributor

noam-graetz commented Dec 12, 2017 via email

Lawouach added a commit that referenced this issue Dec 19, 2017
fix issue #235: change from type() to isinstance())
@h3llrais3r
Copy link

h3llrais3r commented Dec 19, 2017

@Lawouach I've just tested version 0.4.3 with latest cherrypy version 13.1.0 and I confirm it's fixed.
Thanks for the release.

@matt-hammond-001
Copy link
Author

@Lawouach @noam-graetz ... have also just tested with ws4py==0.4.3 and cherrypy==13.1.0. Looks good.

Many thanks. Closing this issue as it is now resolved.

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

No branches or pull requests

3 participants