Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion CherryPy and websockets
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Sylvain Hellegouarch  
View profile  
 More options Oct 30 2012, 12:36 pm
From: Sylvain Hellegouarch <s...@defuze.org>
Date: Tue, 30 Oct 2012 17:36:45 +0100
Local: Tues, Oct 30 2012 12:36 pm
Subject: Re: [cherrypy-users] CherryPy and websockets

Hi Vincent,

On Tue, Oct 30, 2012 at 5:32 PM, Vincent Le Goff <

vincent.legoff....@gmail.com> wrote:
> Hi Sylvain,

> Thanks, that's great, really great :D .  I just have an error while
> trying the echo_cherrypy example.

> I have CherryPy 3.2 (Python 3.2).  The example does start and
> everything's working fine until I launch Firefox on localhost:9000.
> Here's the error:

> [30/Oct/2012:17:26:59] HTTP Traceback (most recent call last):
>   File
> "C:\python32\lib\site-packages\cherrypy-3.2.2-py3.2.egg\cherrypy\_cpreque
> st.py", line 647, in respond
>     self.hooks.run('before_request_body')
>   File
> "C:\python32\lib\site-packages\cherrypy-3.2.2-py3.2.egg\cherrypy\_cpreque
> st.py", line 112, in run
>     raise exc
>   File
> "C:\python32\lib\site-packages\cherrypy-3.2.2-py3.2.egg\cherrypy\_cpreque
> st.py", line 102, in run
>     hook()
>   File
> "C:\python32\lib\site-packages\cherrypy-3.2.2-py3.2.egg\cherrypy\_cpreque
> st.py", line 62, in __call__
>     return self.callback(**self.kwargs)
>   File
> "C:\python32\lib\site-packages\ws4py-0.2.3-py3.2.egg\ws4py\server\cherrypys erver.py",
> line 149, in upgrade
>     ws_key = base64.b64decode(key)
>   File "C:\python32\lib\base64.py", line 83, in b64decode
>     raise TypeError("expected bytes, not %s" % s.__class__.__name__)
> TypeError: expected bytes, not str
> 127.0.0.1 - - [30/Oct/2012:17:26:59] "GET /ws HTTP/1.1" 500 1686 ""
> "Mozilla/5.0

> Maybe it's because the Python 3 sockets exchange bytes, no more str,
> but I doubt of it, as Cherrypy handles it well.  Do you know where
> this problem come from?

I'll admit that I've mostly worked against Python 3.3 and may have
overlooked a few things with 3.2. I will try to see that this evening. Note
also that I'm usually running the latest CherryPy code rather than a stable
version so that might be it as well. Damn :p

--
- Sylvain
http://www.defuze.org
http://twitter.com/lawouach


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.