Bugs item #3606932, was opened at 2013-03-05 08:00
Message generated for change (Comment added) made by nettrom
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3606932&group_id=93107

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: Duplicate
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: Morten Wang (nettrom)
Date: 2013-03-05 08:09

Message:
Duplicate of bug #3606570

User error led to it being submitted again, sorry!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3606932&group_id=93107

_______________________________________________
Pywikipedia-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-bugs

Reply via email to