Last modified: 2014-08-11 05:41:35 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 T57996, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55996 - Bulk loading pages using API broken due to namespace aliases
Bulk loading pages using API broken due to namespace aliases
Status: NEW
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
compat-(1.0)
PC Windows 7
: Lowest normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-22 14:28 UTC by Malafaya
Modified: 2014-08-11 05:41 UTC (History)
4 users (show)

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


Attachments

Description Malafaya 2013-10-22 14:28:11 UTC
It seems this user (User:Elvire) has gender specified as "female", and it changes the default User namespace alias (Portuguese language: default is Utilizador; female is Utilizadora).
The bot cannot find the gender-mapped page in the list of fetched pages:

>touch.py -family:wiktionary -lang:pt Utilizador_discussão:Elvire

'git' is not recognized as an internal or external command,
operable program or batch file.
Getting 1 page via API from wiktionary:pt...
BUG>> title Utilizadora Discussão:Elvire ([[pt:Utilizador Discussão:Elvire]]) no
t found in list
Expected one of: [[pt:Utilizadora Discussão:Elvire]]
Traceback (most recent call last):
  File "D:\Work\pywikipedia\pagegenerators.py", line 1234, in __iter__
    for loaded_page in self.preload(somePages):
  File "D:\Work\pywikipedia\pagegenerators.py", line 1253, in preload
    pywikibot.getall(site, pagesThisSite)
  File "D:\Work\pywikipedia\wikipedia.py", line 5512, in getall
    _GetAll(site, pages, throttle, force).run()
  File "D:\Work\pywikipedia\wikipedia.py", line 5128, in run
    self.oneDoneApi(vals)
  File "D:\Work\pywikipedia\wikipedia.py", line 5406, in oneDoneApi
    raise PageNotFound
PageNotFound



Pywikibot: wikipedia.py (r-1 (unknown), 1b27881, 2013/10/14, 11:11:46, OUTDATED)

Release version: 1.0b1
Python: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
Comment 1 JAn Dudík 2013-10-22 18:56:25 UTC
same problem with other scripts (replace.py, template.py) and 
[[diskuse s wikipedistkou:Username]] (female user talk page) in cs.wiki
Comment 2 Merlijn van Deen (test) 2013-10-26 16:59:53 UTC
This should be fixed (inadvertently) due by https://gerrit.wikimedia.org/r/#/c/92068/ - pwb will use Special:Export again.


Keeping this bug open, however, as it's *really* strange to trigger behavior depending on a -debug flag...


Script to reproduce:
>>> pywikibot.logger.setLevel(pywikibot.DEBUG)
>>> import pywikibot
>>> pywikibot.logger.setLevel(pywikibot.DEBUG)
>>> pywikibot.getall(pywikibot.Site('pt', 'wikipedia'), [pywikibot.Page('pt', u'Utilizador_discussão:Elvire')])
Getting 1 page via API from wikipedia:pt...
BUG>> title Usuária Discussão:Elvire ([[pt:Usuário(a) Discussão:Elvire]]) not found in list
Expected one of: [[pt:Usuária Discussão:Elvire]]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "wikipedia.py", line 5956, in getall
    _GetAll(site, pages, throttle, force).run()
  File "wikipedia.py", line 5528, in run
    self.oneDoneApi(vals)
  File "wikipedia.py", line 5829, in oneDoneApi
    raise PageNotFound
pywikibot.exceptions.PageNotFound

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


Navigation
Links