pyxmpp2
pyxmpp2 copied to clipboard
socket.error: [Errno 10035]
pyxmpp2\transport.py line:329 self._socket.setblocking(False) throw socket.error [Errno 10035] os: window xp
_set_state('connect')
dispatching...
queue empty
preparing handler: <pyxmpp2.transport.TCPTransport object at 0x00F2C030>
TCPHandler.prepare(): state: 'connect'
_set_state('aborted')
Traceback (most recent call last):
File "C:\Documents and Settings\send_message_client.py", line 31, in
File "E:\work\tools\lib\site-packages\pyxmpp2-2.0alpha2-py2.7.egg\pyxmpp2\simple.py", line 144, in send_message handler.run() File "E:\work\tools\lib\site-packages\pyxmpp2-2.0alpha2-py2.7.egg\pyxmpp2\simple.py", line 64, in run self.client.run() File "E:\work\tools\lib\site-packages\pyxmpp2-2.0alpha2-py2.7.egg\pyxmpp2\client.py", line 216, in run self.main_loop.loop(timeout) File "E:\work\tools\lib\site-packages\pyxmpp2-2.0alpha2-py2.7.egg\pyxmpp2\mainloop\base.py", line 86, in loop self.loop_iteration(interval) File "E:\work\tools\lib\site-packages\pyxmpp2-2.0alpha2-py2.7.egg\pyxmpp2\mainloop\select.py", line 65, in loop_iteration readable, writable, next_timeout = self._prepare_handlers() File "E:\work\tools\lib\site-packages\pyxmpp2-2.0alpha2-py2.7.egg\pyxmpp2\mainloop\select.py", line 98, in _prepare_handlers ret = handler.prepare() File "E:\work\tools\lib\site-packages\pyxmpp2-2.0alpha2-py2.7.egg\pyxmpp2\transport.py", line 514, in prepare self._start_connect() File "E:\work\tools\lib\site-packages\pyxmpp2-2.0alpha2-py2.7.egg\pyxmpp2\transport.py", line 333, in _start_connect self._socket.connect(addr) File "E:\work\tools\lib\socket.py", line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 10035]
Please send whole stack trace and describe circumstances when this happened. The code was developed in Linux and not well tested under Windows so help with fixing this is welcome.
i changed code to below it's success: if not self._socket or self._family != family: self._socket = socket.socket(family, socket.SOCK_STREAM) self._socket.setblocking(True)# added by myself pass self._dst_addr = addr self._family = family try: self._socket.connect(addr) self._socket.setblocking(False)# added by myself