This works on Trusty, but on Precise it fails with:
scfc@toolsbeta-test-precise:~$ bin/socketio_client-test.py
Traceback (most recent call last):
File "bin/socketio_client-test.py", line 13, in <module>
socketIO = socketIO_client.SocketIO('stream.wikimedia.org', 80)
File "/usr/lib/python2.7/dist-packages/socketIO_client/__init__.py", line 136, in __init__
self.define(Namespace)
File "/usr/lib/python2.7/dist-packages/socketIO_client/__init__.py", line 150, in define
namespace = Namespace(self._transport, path)
File "/usr/lib/python2.7/dist-packages/socketIO_client/__init__.py", line 237, in _transport
self.__transport = self._get_transport()
File "/usr/lib/python2.7/dist-packages/socketIO_client/__init__.py", line 251, in _get_transport
self.is_secure, self.base_url, **self.kw)
File "/usr/lib/python2.7/dist-packages/socketIO_client/__init__.py", line 402, in _get_socketIO_session
response_parts = response.text.split(':')
AttributeError: 'Response' object has no attribute 'text'
Exception AttributeError: "'SocketIO' object has no attribute '_SocketIO__transport'" in <bound method SocketIO.__del__ of <socketIO_client.SocketIO object at 0x7f234dddd4d0>> ignored
scfc@toolsbeta-test-precise:~$
This is probably due to python-requests being 0.8.2 in Precise and 2.2.1 in Trusty.
Tested with script from https:/ /wikitech. wikimedia. org/wiki/ RCStream# Python:
import socketIO_client
class WikiNamespace( socketIO_ client. BaseNamespace) :
print( '%(user) s edited %(title)s' % change)
def on_change(self, change):
def on_connect(self):
self.emit( 'subscribe' , 'commons. wikimedia. org')
socketIO = socketIO_ client. SocketIO( 'stream. wikimedia. org', 80) define( WikiNamespace, '/rc')
socketIO.
socketIO.wait()
This works on Trusty, but on Precise it fails with:
scfc@toolsbeta- test-precise: ~$ bin/socketio_ client- test.py client- test.py" , line 13, in <module> client. SocketIO( 'stream. wikimedia. org', 80) python2. 7/dist- packages/ socketIO_ client/ __init_ _.py", line 136, in __init__ define( Namespace) python2. 7/dist- packages/ socketIO_ client/ __init_ _.py", line 150, in define self._transport , path) python2. 7/dist- packages/ socketIO_ client/ __init_ _.py", line 237, in _transport __transport = self._get_ transport( ) python2. 7/dist- packages/ socketIO_ client/ __init_ _.py", line 251, in _get_transport python2. 7/dist- packages/ socketIO_ client/ __init_ _.py", line 402, in _get_socketIO_ session text.split( ':') _transport' " in <bound method SocketIO.__del__ of <socketIO_ client. SocketIO object at 0x7f234dddd4d0>> ignored test-precise: ~$
Traceback (most recent call last):
File "bin/socketio_
socketIO = socketIO_
File "/usr/lib/
self.
File "/usr/lib/
namespace = Namespace(
File "/usr/lib/
self.
File "/usr/lib/
self.is_secure, self.base_url, **self.kw)
File "/usr/lib/
response_parts = response.
AttributeError: 'Response' object has no attribute 'text'
Exception AttributeError: "'SocketIO' object has no attribute '_SocketIO_
scfc@toolsbeta-
This is probably due to python-requests being 0.8.2 in Precise and 2.2.1 in Trusty.