https://bugzilla.wikimedia.org/show_bug.cgi?id=69980
Bug ID: 69980 Summary: patrol.py depends on mwlib.uparser not available Product: Pywikibot Version: compat (1.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: pdsanchez@gmail.com Web browser: --- Mobile Platform: ---
on wmflabs I ran python patrol.py and it complained on "import mwlib.uparser" since it is no longer included.
Therefore, script can't work anymore
I just pulled again to check, and nothing
<pre> ImportError: No module named mwlib.uparser
│tools.drini@tools-login:~/pywikibot-compat$ git pull │remote: Counting objects: 737, done │remote: Finding sources: 100% (9/9) │remote: Getting sizes: 100% (1/1) │remote: Compressing objects: 100% (6536/6536) │remote: Total 9 (delta 5), reused 7 (delta 5) │Unpacking objects: 100% (9/9), done. │From https://gerrit.wikimedia.org/r/pywikibot/compat │ 1ae3ae7..f4d1869 master -> origin/master │Updating 1ae3ae7..f4d1869 │Fast-forward │ family.py | 2 +- │ pywikibot/support.py | 3 --- │ 2 files changed, 1 insertion(+), 4 deletions(-)
│tools.drini@tools-login:~/pywikibot-compat$ python patrol.py │Traceback (most recent call last): >>> Historia del fútbol de Jalisco <<< │ File "patrol.py", line 21, in <module> - Los jóvenes almacenistas del Ciudad de méxico desaparecieron del panorama futbolero, │ import mwlib.uparser # used to parse the whitelist
https://bugzilla.wikimedia.org/show_bug.cgi?id=69980
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jayvdb@gmail.com
--- Comment #1 from John Mark Vandenberg jayvdb@gmail.com --- Did it work previously? i.e. has the python package mwlib been uninstalled recently?
Are you able to create a virtualenv on wmflabs and install mwlib in it?
$ [your_ve/bin/]pip install mwlib
(see https://www.digitalocean.com/community/tutorials/common-python-tools-using-v... for example)
https://bugzilla.wikimedia.org/show_bug.cgi?id=69980
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|patrol.py depends on |patrol.py depends on |mwlib.uparser not available |mwlib.uparser not available | |on wmflabs
--- Comment #2 from John Mark Vandenberg jayvdb@gmail.com --- fwiw, in case it is a version issue, mwlib 0.15.14 works for me.
import mwlib._version mwlib._version.display_version
'0.15.14'
import mwlib.uparser mwlib.uparser.parseString(raw='== Foo ==',title='Foo')
Article->'Foo'
https://bugzilla.wikimedia.org/show_bug.cgi?id=69980
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugzilla.wikimedia. | |org/show_bug.cgi?id=72206
pywikipedia-bugs@lists.wikimedia.org