Page MenuHomePhabricator

unexpected status 404 while using liverecentchanges with incorrect socketIO-client version
Closed, ResolvedPublic

Description

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)

Event Timeline

Xqt created this task.Jan 28 2016, 9:48 AM
Xqt raised the priority of this task from to Medium.
Xqt updated the task description. (Show Details)
Xqt added a project: Pywikibot.
Xqt added a subscriber: Xqt.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptJan 28 2016, 9:48 AM
Xqt added a subscriber: valhallasw.Jan 28 2016, 9:49 AM
Xqt added a comment.Jan 28 2016, 9:51 AM

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:

-e git+https://github.com/invisibleroads/socketIO-client@c1e49247178681c828a5e91134a4ace4582cca19#egg=socketIO_client-master

(dixit pip freeze)

Xqt added a comment.Jan 28 2016, 10:51 AM

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"

?

Xqt added a comment.Jan 28 2016, 11:24 AM

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'?

Xqt added a comment.Jan 28 2016, 12:11 PM

--> 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

jayvdb added a subscriber: jayvdb.Jan 28 2016, 12:54 PM

We could feature detect that the wrong version has been installed, and show a custom message.

jayvdb renamed this task from unexprected status 404 while using liverecentchanges to unexpected status 404 while using liverecentchanges with incorrect socketIO-client version.Jan 28 2016, 12:55 PM
jayvdb set Security to None.
Xqt closed this task as Resolved.Jan 29 2016, 9:52 AM
Xqt claimed this task.
Krenair added a subscriber: Krenair.Jan 8 2017, 5:25 AM