Last modified: 2014-10-18 09:02:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71980, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69980 - patrol.py depends on mwlib.uparser not available on wmflabs
patrol.py depends on mwlib.uparser not available on wmflabs
Status: NEW
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
compat-(1.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-25 15:25 UTC by Pedro Sánchez
Modified: 2014-10-18 09:02 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Pedro Sánchez 2014-08-25 15:25:32 UTC
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
Comment 1 John Mark Vandenberg 2014-09-09 08:55:27 UTC
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-virtualenv-installing-with-pip-and-managing-packages for example)
Comment 2 John Mark Vandenberg 2014-09-09 09:03:00 UTC
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'

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links