C:\pwb\GIT\core>pwb.py listpages -liverecentchanges -total:5 WARNING:root:stream.wikimedia.org:80/socket.io [waiting for connection] unexpected status code (404 404 Not Found)
Description
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Declined | Xqt | T125197 Give hint to the current socketIO_client in ImportError of rcstream.py | |||
| Resolved | Xqt | T125059 unexpected status 404 while using liverecentchanges with incorrect socketIO-client version |
Event Timeline
traceback after ctrl-c:
C:\pwb\GIT\core>pwb.py listpages -liverecentchanges -total:5
WARNING:root:stream.wikimedia.org:80/socket.io [waiting for connection] unexpect
ed status code (404 404 Not Found)
Traceback (most recent call last):
File "C:\pwb\GIT\core\pwb.py", line 248, in <module>
if not main():
File "C:\pwb\GIT\core\pwb.py", line 242, in main
run_python_file(filename, [filename] + args, argvu, file_package)
File "C:\pwb\GIT\core\pwb.py", line 120, in run_python_file
main_mod.__dict__)
File ".\scripts\listpages.py", line 277, in <module>
main()
File ".\scripts\listpages.py", line 251, in main
for i, page in enumerate(gen, start=1):
File "C:\pwb\GIT\core\pywikibot\pagegenerators.py", line 2312, in LiveRCPageGe
nerator
for entry in site_rc_listener(site, total=total):
File "C:\pwb\GIT\core\pywikibot\comms\rcstream.py", line 191, in rc_listener
total=total
File "C:\pwb\GIT\core\pywikibot\comms\rcstream.py", line 93, in __init__
self.client = socketIO_client.SocketIO(rchost, rcport)
File "C:\Python27\lib\site-packages\socketIO_client\__init__.py", line 331, in __init__
resource, hurry_interval_in_seconds, **kw)
File "C:\Python27\lib\site-packages\socketIO_client\__init__.py", line 51, in __init__
self._transport
File "C:\Python27\lib\site-packages\socketIO_client\__init__.py", line 59, in _transport
self._engineIO_session = self._get_engineIO_session()
File "C:\Python27\lib\site-packages\socketIO_client\__init__.py", line 79, in _get_engineIO_session
warning_screen.throw(warning)
File "C:\Python27\lib\site-packages\socketIO_client\logs.py", line 29, in _yield_warning_screen
time.sleep(1)
KeyboardInterrupt
VERBOSE:pywiki:Found 1 wikipedia:de processes running, including this one.
VERBOSE:pywiki:Dropped throttle(s).
<type 'exceptions.KeyboardInterrupt'>
CRITICAL: Closing network session.
CRITICAL:pywiki:Closing network session.
VERBOSE:pywiki:Network session closed.Seems to work for me -- maybe this is a socket.io 0.9 vs 1.0 incompatibility? I have this version installed:
(dixit pip freeze)
I just followed the ImportError message and installed it with "pip install socketIO_client"
I found
>>> import socketIO_client >>> socketIO_client.__version__ '0.6.3'
What is going wrong there?
https://pypi.python.org/pypi/socketIO-client#id5
Try installing
pip install "socketIO_client==0.5.6"
?
looks good. Thanks. Couldn't the ImportError warning depend on socket.io version? And btw where do I find it? Or is it py2.7 vs py3.X ?
No, it's related to incompatible versions of the socket.io protocol (0.9 vs 1.0). What do you mean with 'find it'?
--> Couldn't the ImportError warning depend on socket.io version and give the hint either
pip install "socketIO_client==0.5.6"
or
pip install socketIO_client
We could feature detect that the wrong version has been installed, and show a custom message.