Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Israel Brewster Newsgroups: comp.lang.python Subject: Re: CherryPy cpstats and ws4py Date: Wed, 4 Nov 2015 11:13:00 -0900 Lines: 120 Message-ID: References: Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_480192C7-F43A-4947-9E5B-168CB58BDAD7" X-Trace: news.uni-berlin.de i9woTKRdxCu9GWozqumEWgv1/5DyLsJZj9/9bZwZcGIA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'skip:[ 20': 0.03; 'failing': 0.05; 'skip:" 60': 0.05; 'socket': 0.07; 'cherrypy': 0.09; 'functioning': 0.09; 'skip:" 80': 0.09; 'sockets': 0.09; 'supported.': 0.09; 'user-agent:': 0.09; 'python': 0.10; 'server,': 0.15; 'skip:f 30': 0.15; "'/'": 0.16; '63,': 0.16; 'headers:': 0.16; 'host:': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'app': 0.16; 'attribute': 0.18; 'conjunction': 0.18; 'frameworks': 0.18; 'intel': 0.18; 'working.': 0.18; 'solution.': 0.18; 'thanks.': 0.18; 'suggested': 0.20; 'fix': 0.21; 'posted': 0.21; 'disable': 0.22; 'gather': 0.22; 'trying': 0.22; 'am,': 0.23; '(most': 0.24; 'header:In- Reply-To:1': 0.24; 'skip:- 40': 0.25; "i've": 0.25; 'figure': 0.27; 'tech': 0.27; 'specifically': 0.28; "skip:' 10": 0.28; 'flying': 0.29; 'project?': 0.29; 'question:': 0.29; 'raise': 0.29; 'url:mailman': 0.30; 'skip:g 30': 0.30; 'to:name:python- list': 0.30; "i'd": 0.31; 'skip:s 30': 0.31; 'post': 0.31; 'maybe': 0.33; 'run': 0.33; 'url:python': 0.33; 'http': 0.33; 'impression': 0.33; 'traceback': 0.33; 'url:listinfo': 0.34; 'file': 0.34; 'that,': 0.34; 'next': 0.35; 'nov': 0.35; 'skip:" 50': 0.35; 'widely': 0.35; 'knowledge': 0.35; 'but': 0.36; 'list,': 0.36; 'should': 0.36; 'there': 0.36; 'url:org': 0.36; 'tool': 0.36; 'possible': 0.36; 'framework': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'two': 0.37; 'thanks': 0.37; 'mac': 0.37; 'skip:s 50': 0.37; 'thought': 0.37; 'charset:us-ascii': 0.37; 'feedback': 0.38; 'someone': 0.38; 'mailing': 0.38; 'end': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'some': 0.40; 'skip:u 10': 0.61; 'header:Message-Id:1': 0.61; 'here.': 0.62; 'more': 0.63; 'different': 0.63; 'soon': 0.65; 'received:10.9': 0.66; 'gotten': 0.76; 'received:12': 0.81; '__call__': 0.84; 'application?': 0.84; 'assessment,': 0.84; 'alaska': 0.91 X-Warning: RFC compliance checks disabled due to whitelist X-Warning: Reverse-Path DNS check skipped due to whitelist X-Warning: Maximum message size check skipped due to whitelist X-Warning: Realtime Block Lists skipped due to whitelist X-Warning: System filters skipped due to whitelist X-Warning: Domain filters skipped due to whitelist X-Warning: User filters skipped due to whitelist X-Warning: Anti-Spam check skipped due to whitelist X-Whitelist: 2147483645 X-Envelope-From: israel@ravnalaska.net X-Envelope-To: python-list@python.org In-Reply-To: X-Mailer: Apple Mail (2.3096.5) X-Content-Filtered-By: Mailman/MimeDel 2.1.20+ X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:98242 --Apple-Mail=_480192C7-F43A-4947-9E5B-168CB58BDAD7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Ok, let me ask a different question: the impression I have gotten when = trying to find help with CherryPy in general and ws4py specifically is = that these frameworks are not widely used or well supported. Is that a = fair assessment, or do I just have issues that are outside the realm of = experience for other users? If it is a fair assessment, should I be = looking at a different product for my next project? I know there are a = number of options, CherryPy was simply the first one suggested to me, = and ws4py is what is listed in their docs as the framework to use for = Web Sockets. Thanks for any feedback that can be provided. ----------------------------------------------- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7293 ----------------------------------------------- --Apple-Mail=_480192C7-F43A-4947-9E5B-168CB58BDAD7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii =20 > On Nov 3, 2015, at 8:05 AM, Israel Brewster = wrote: >=20 > I posted this to the CherryPy and ws4py mailing lists, but in the week = since I did that I've only gotten two or three views on each list, and = no responses, so as a last-ditch effort I thought I'd post here. Maybe = someone with more general python knowledge than me can figure out the = traceback and from there a solution. >=20 > Is it possible to use ws4py in conjunction with the cpstats CherryPy = tool? I have a CherryPy (3.8.0) web app that uses web sockets via ws4py. = Tested and working. I am now trying to get a little more visibility into = the functioning of the server, so to that end I enabled the cpstats tool = by adding the following line to my '/' configuration: >=20 > tools.cpstats.on=3DTrue >=20 > Unfortunately, as soon as I do that, attempts to connect a web socket = start failing with the following traceback: >=20 > [28/Oct/2015:08:18:48] =20 > Traceback (most recent call last): > File = "/Library/Python/2.7/site-packages/CherryPy-3.8.0-py2.7.egg/cherrypy/_cpre= quest.py", line 104, in run > hook() > File = "/Library/Python/2.7/site-packages/CherryPy-3.8.0-py2.7.egg/cherrypy/_cpre= quest.py", line 63, in __call__ > return self.callback(**self.kwargs) > File = "build/bdist.macosx-10.10-intel/egg/ws4py/server/cherrypyserver.py", = line 200, in upgrade > ws_conn =3D get_connection(request.rfile.rfile) > File "build/bdist.macosx-10.10-intel/egg/ws4py/compat.py", line 43, = in get_connection > return fileobj._sock > AttributeError: 'KnownLengthRFile' object has no attribute '_sock' > [28/Oct/2015:08:18:48] HTTP=20 > Request Headers: > PRAGMA: no-cache > COOKIE: autoTabEnabled=3Dtrue; fleetStatusFilterCompany=3D7H; = fleetStatusFilterLocation=3DALL; fleetStatusRefreshInterval=3D5; = inputNumLegs=3D5; session_id=3D5c8303896aff419c175c79dfadbfdc9d75e6c45a > UPGRADE: websocket > HOST: flbubble.ravnalaska.net:8088 > ORIGIN: http://flbubble.ravnalaska.net > CONNECTION: Upgrade > CACHE-CONTROL: no-cache > SEC-WEBSOCKET-VERSION: 13 > SEC-WEBSOCKET-EXTENSIONS: x-webkit-deflate-frame > USER-AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) = AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7 > SEC-WEBSOCKET-KEY: Szh6Uoe+WzqKR1DgW8JcXA=3D=3D > Remote-Addr: 10.9.1.59 > [28/Oct/2015:08:18:48] HTTP=20 > Traceback (most recent call last): > File = "/Library/Python/2.7/site-packages/CherryPy-3.8.0-py2.7.egg/cherrypy/_cpre= quest.py", line 661, in respond > self.hooks.run('before_request_body') > File = "/Library/Python/2.7/site-packages/CherryPy-3.8.0-py2.7.egg/cherrypy/_cpre= quest.py", line 114, in run > raise exc > AttributeError: 'KnownLengthRFile' object has no attribute '_sock' >=20 > Disable tools.cpstats.on, and the sockets start working again. Is = there some way I can fix this so I can use sockets as well as gather = stats from my application? Thanks. >=20 > ----------------------------------------------- > Israel Brewster > Systems Analyst II > Ravn Alaska > 5245 Airport Industrial Rd > Fairbanks, AK 99709 > (907) 450-7293 > ----------------------------------------------- >=20 > --=20 > https://mail.python.org/mailman/listinfo/python-list --Apple-Mail=_480192C7-F43A-4947-9E5B-168CB58BDAD7--