Found another bug related to this issue: 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'
Let me know if it's easier to simply open a bug on SourceForge for this instead. Regards, Morten On 28 February 2013 09:55, Morten Wang <[email protected]> wrote: > [inadvertently only replied to xqt, sorry about double emails, thought I'd > post to the list too] > > Awesome work, thanks for the speedy bugfix! > > I noticed that it appears to also affect PreloadingGenerator, I get these > warnings: > WARNING: preloadpages: Query returned unexpected title > 'Usuário:Vitorvicentevalente' > WARNING: preloadpages: Query returned unexpected title > 'Usuário:Vitorvicentevalente/Etiquetas' > > Is that something that's easy to fix too, or should I perhaps switch to > not preloading the pages? Looks like the warning's thrown in site.py, > preloadpages, line 1291. > > > Regards, > Morten > > > On 28 February 2013 04:31, <[email protected]> wrote: > >> Fixes in r11139 >> >> best >> >> xqt >> >> >> ----- Original Nachricht ---- >> Von: Morten Wang <[email protected]> >> An: Pywikipedia discussion list <[email protected]> >> Datum: 27.02.2013 20:46 >> Betreff: Re: [Pywikipedia-l] Rewrite branch, >> issue with user pages in aliased namespace >> >> > Deleted the API cache and the cookie file, still get the same error. >> > Making sure the site reloads the namespace info (by calling >> > site._getsiteinfo(force=True)) didn't help either. >> > >> > It's line 1711 in site.py (method loadrevisions) that's throwing the >> > exception, in case that wasn't already obvious. >> > >> > >> > Regards, >> > Morten >> > >> > >> > On 27 February 2013 12:28, <[email protected]> wrote: >> > >> > > You should delete the API cache first. >> > > >> > > xqt >> > > ------------------------------ >> > > Von: Morten Wang >> > > Gesendet: 27.02.2013 16:39 >> > > An: Pywikipedia discussion list >> > > Betreff: [Pywikipedia-l] Rewrite branch,issue with user pages in >> aliased >> > > namespace >> > > >> > > >> > > Hi all, >> > > >> > > I've run into an interesting issue on Portuguese Wikipedia, with a >> user >> > > page that's in the aliased user namespace: >> > > >> > > import pywikibot; >> > > site = pywikibot.getSite('pt'); >> > > page = pywikibot.Page(site, u"Usuário:Vitorvicentevalente"); >> > > page.title(); >> > > u'Usu\xe1rio(a):Vitorvicentevalente' >> > > page.get() >> > > [NOTE: callback trace removed for brevity] >> > > pywikibot.exceptions.Error: loadrevisions: Query on >> > > [[pt:Usuário(a):Vitorvicentevalente]] returned data on >> > > 'Usuário:Vitorvicentevalente' >> > > >> > > According to the API "Usuário" is a valid namespace alias[1]. Is >> there >> > an >> > > easy workaround or fix here? >> > > >> > > Also, I've noticed this is not an issue in trunk, it's just the >> rewrite >> > > branch that produces this error. >> > > >> > > >> > > Footnotes: >> > > 1: ref: >> > > >> > >> http://pt.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=general| >> > namespaces|namespacealiases >> > > >> > > >> > > Regards, >> > > Morten >> > > >> > > >> > > _______________________________________________ >> > > Pywikipedia-l mailing list >> > > [email protected] >> > > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l >> > > >> > > >> > >> > >> > -------------------------------- >> > >> > _______________________________________________ >> > Pywikipedia-l mailing list >> > [email protected] >> > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l >> > >> > >
_______________________________________________ Pywikipedia-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
