Bugs item #3408700, was opened at 2011-09-13 16:56 Message generated for change (Tracker Item Submitted) made by wikipedian You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3408700...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: solve_disambiguation Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Daniel Herding (wikipedian) Assigned to: Nobody/Anonymous (nobody) Summary: [rewrite] bot requires login on wikis it won't touch
Initial Comment: In today's SVN version of the rewrite branch, I'm trying to run solve_disambiguation -lang:de MSSR and change the link to "Moldauische Sozialistische Sowjetrepublik". In my user-config.py, I have entered my Bot login for the de Wikipedia.
However, while replacing, the bot crashes because it doesn't have a login for the be (Belarusian) Wikipedia. This happens because in the treat() method of solve_disambiguation, all links are checked, and interwiki links are skipped. To test whether a link is an interwiki link, it compares sites. The Link.site() getter calls the parse() method, which does an API siteinfo request on be: to check whether the wiki is capitalizing titles. For this API request, you need a be: login.
This means that, to run solve_disambiguation.py, you need a login on ALL Wikipedias.
I think that you shouldn't have to do any API requests just to parse a link. Not only do you need a login, but it also slows the bot down.
------
C:\Users\dh\pywikipedia-rewrite>scripts\solve_disambiguation.py -lang:de MSSR
0 - Abkürzung 1 - Mes Souliers Sont Rouges 2 - Moldauische Sozialistische Sowjetrepublik 3 - Redemptoristinnen 4 - Sekundärradar 5 - Wikipedia:Begriffsklärung
Found 3 references. Will work on 1 pages. Retrieving 1 pages from wikipedia:de.
Transnistrien-Konflikt <<<
e [[staatliche Souveränität]]. Die Bevölkerung der früheren [[MSSR]] war aufgrun d der Geschichte Bessarabiens sehr heterogen und Option (#, r#, [s]kip link, [e]dit page, [n]ext page, [u]nlink, [q]uit, [t]ag template {{dn}}, [m]ore context, show [d]isambiguation page, [l]ist, [a]dd new): 2 Traceback (most recent call last): File "C:\Users\dh\pywikipedia-rewrite\scripts\solve_disambiguation.py", line 1 095, in <module> main() File "C:\Users\dh\pywikipedia-rewrite\scripts\solve_disambiguation.py", line 1 090, in main bot.run() File "C:\Users\dh\pywikipedia-rewrite\scripts\solve_disambiguation.py", line 9 87, in run if not self.treat(refPage, disambPage): File "C:\Users\dh\pywikipedia-rewrite\scripts\solve_disambiguation.py", line 6 11, in treat if foundlink.site != disambPage.site: File "C:\Program Files\Python\lib\site-packages\pywikipediabot-2.0alpha-py2.7. egg\pywikibot\page.py", line 2380, in site self.parse() File "C:\Program Files\Python\lib\site-packages\pywikipediabot-2.0alpha-py2.7. egg\pywikibot\page.py", line 2363, in parse if self._site.case() == 'first-letter': File "C:\Program Files\Python\lib\site-packages\pywikipediabot-2.0alpha-py2.7. egg\pywikibot\site.py", line 973, in case return self.siteinfo['case'] File "C:\Program Files\Python\lib\site-packages\pywikipediabot-2.0alpha-py2.7. egg\pywikibot\site.py", line 967, in siteinfo self._getsiteinfo() File "C:\Program Files\Python\lib\site-packages\pywikipediabot-2.0alpha-py2.7. egg\pywikibot\site.py", line 924, in _getsiteinfo sidata = sirequest.submit() File "C:\Program Files\Python\lib\site-packages\pywikipediabot-2.0alpha-py2.7. egg\pywikibot\data\api.py", line 220, in submit self.site.login(False) File "C:\Program Files\Python\lib\site-packages\pywikipediabot-2.0alpha-py2.7. egg\pywikibot\site.py", line 706, in login user=self._username[sysop]) File "C:\Program Files\Python\lib\site-packages\pywikipediabot-2.0alpha-py2.7. egg\pywikibot__init__.py", line 124, in wrapper return method(*__args, **__kw) File "C:\Program Files\Python\lib\site-packages\pywikipediabot-2.0alpha-py2.7. egg\pywikibot__init__.py", line 124, in wrapper return method(*__args, **__kw) File "C:\Program Files\Python\lib\site-packages\pywikipediabot-2.0alpha-py2.7. egg\pywikibot\login.py", line 105, in __init__ 'wiki_code': self.site.code}) pywikibot.exceptions.NoUsername: ERROR: Username for wikipedia:be is undefined. If you have an account for that site, please add a line to user-config.py:
usernames['wikipedia']['be'] = 'myUsername'
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3408700...