Exception from chat

15 views
Skip to first unread message

bradipoplacido

unread,
Apr 17, 2012, 1:32:54 PM4/17/12
to Nagare users
Hello all
I ave followed the instruction for installing Python 2.7.1 Stackless
and Nagare and examples
on my Win7 Ultimate 64bit
Other examples go ok, but the chat demo give me this
----------------------------------------
Exception happened during processing of request from ('127.0.0.1',
53205)
Traceback (most recent call last):
File "D:\Nagare\lib\site-packages\paste-1.7.5.1-py2.7.egg\paste
\httpserver.py", line 1068, in process_request_in_thread
self.finish_request(request, client_address)
File "D:\Python27sl\Lib\SocketServer.py", line 323, in
finish_request
self.RequestHandlerClass(request, client_address, self)
File "D:\Python27sl\Lib\SocketServer.py", line 639, in __init__
self.handle()
File "D:\Nagare\lib\site-packages\paste-1.7.5.1-py2.7.egg\paste
\httpserver.py", line 442, in handle
BaseHTTPRequestHandler.handle(self)
File "D:\Python27sl\Lib\BaseHTTPServer.py", line 337, in handle
self.handle_one_request()
File "D:\Nagare\lib\site-packages\paste-1.7.5.1-py2.7.egg\paste
\httpserver.py", line 437, in handle_one_request
self.wsgi_execute()
File "D:\Nagare\lib\site-packages\paste-1.7.5.1-py2.7.egg\paste
\httpserver.py", line 287, in wsgi_execute
self.wsgi_start_response)
File "D:\Nagare\lib\site-packages\paste-1.7.5.1-py2.7.egg\paste
\urlmap.py", line 203, in __call__
return app(environ, start_response)
File "D:\Nagare\lib\site-packages\nagare-0.4.1-py2.7.egg\nagare
\wsgi.py", line 376, in __call__
comet.channels.connect(channel_id, int(nb),
environ['wsgi.input'].file.fileno(), response)
File "D:\Nagare\lib\site-packages\nagare-0.4.1-py2.7.egg\nagare
\comet.py", line 240, in connect
self.discard_disconnected_clients()
File "D:\Nagare\lib\site-packages\nagare-0.4.1-py2.7.egg\nagare
\comet.py", line 246, in discard_disconnected_clients
channel.discard_disconnected_clients()
File "D:\Nagare\lib\site-packages\nagare-0.4.1-py2.7.egg\nagare
\comet.py", line 113, in discard_disconnected_clients
clients_to_discard = select.select(self.clients, [], [], 0)[0]
error: (10022, 'An invalid argument was supplied')
----------------------------------------
I am a old novice, know noting about comet
can anyone give me hint ?

crumble

unread,
Apr 17, 2012, 5:57:44 PM4/17/12
to Nagare users
As stated in select documentation (http://docs.python.org/library/
select.html?highlight=select#select.select), three empty sequences as
parameters for select does not work under windows.

I think at startup, as there is no client, self.clients is an empty
sequence, therefore it fails under windows. So at the moment chat demo
does not work under windows.

apoirier

unread,
Apr 18, 2012, 6:42:36 AM4/18/12
to Nagare users
Hi,

Issue #1521 created: http://www.nagare.org/trac/ticket/1521

Thanks for the bug report bradipoplacido.

On 17 avr, 23:57, crumble <herve.coatan...@gmail.com> wrote:
> As stated in select documentation (http://docs.python.org/library/
> select.html?highlight=select#select.select), three empty sequences as
> parameters for select does not work under windows.
>
> I think at startup, as there is no client, self.clients is an empty
> sequence, therefore it fails under windows. So at the moment chat demo
> does not work under windows.

As I don't immediatly have access to a windows machine, can you try to
add the line `if not self.clients: return` before line #113 in
`comet.py`?

apoirier

unread,
Apr 30, 2012, 8:42:07 AM4/30/12
to Nagare users
Hi,

On Apr 18, 12:42 pm, apoirier <alain.poiri...@gmail.com> wrote:
> Hi,
>
> Issue #1521 created:http://www.nagare.org/trac/ticket/1521
>
> Thanks for the bug report bradipoplacido.
>
> On 17 avr, 23:57, crumble <herve.coatan...@gmail.com> wrote:
>
> > As stated in select documentation (http://docs.python.org/library/
> > select.html?highlight=select#select.select), three empty sequences as
> > parameters for select does not work under windows.
>
> > I think at startup, as there is no client, self.clients is an empty
> > sequence, therefore it fails under windows. So at the moment chat demo
> > does not work under windows.
>
> As I don't immediatly have access to a windows machine, can you try to
> add the line `if not self.clients: return` before line #113 in
> `comet.py`?

This change is now integrated (http://www.nagare.org/trac/changeset/
a3f125564c0e523aab8c9af67e74f0fb4e44fb89/core)
Reply all
Reply to author
Forward
0 new messages