Bugs item #3606570, was opened at 2013-03-01 11:41
Message generated for change (Comment added) made by russblau
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=360657…
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: rewrite
Group: rewrite
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Morten Wang (nettrom)
Assigned to: Russell Blau (russblau)
Summary: Namespace alias error with preloading and page.exists()
Initial Comment:
As of revision 11144, the following attempt to preload a page in a specific aliased
namespace on Portuguese Wikipedia fails:
import pywikibot;
site = pywikibot.getSite('pt');
site.login();
from pywikibot.pagegenerators import PreloadingGenerator, PagesFromTitlesGenerator;
pageGen =
PreloadingGenerator(PagesFromTitlesGenerator([u"Usuário:Vitorvicentevalente"],
site=site));
for page in pageGen:
print page.title();
Gives the following output:
Retrieving 1 pages from wikipedia:pt.
WARNING: preloadpages: Query returned unexpected title
'Usuário:Vitorvicentevalente'
Creating a Page object and asking if the page exists also fails:
import pywikibot;
site = pywikibot.getSite('pt');
site.login();
page = pywikibot.Page(site, u"Usuário:Vitorvicentevalente");
page.exists();
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pywikibot/page.py", line 417, in exists
return self.site.page_exists(self)
File "pywikibot/site.py", line 1180, in page_exists
return page._pageid > 0
AttributeError: 'Page' object has no attribute '_pageid'
Output of python scripts/version.py
Pywikibot (r10326 (pywikibot/__init__.py), 2012/06/08, 12:08:53, OUTDATED)
Python 2.7.1 (r271:86832, Feb 8 2011, 09:38:37)
[GCC 4.2.3]
unicode test: triggers problem #3081100
----------------------------------------------------------------------
Comment By: Russell Blau (russblau)
Date:
2013-03-08 12:07
Message:
Fixed in rev 11195
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=360657…