[prev in list] [next in list] [prev in thread] [next in thread]
List: pywikipediabot-users
Subject: Re: [Pywikipedia-l] Rewrite branch, issue with user pages in aliased namespace
From: <info () gno ! de>
Date: 2013-03-01 18:47:36
Message-ID: 20130301184532.0E8643AEBCE () mail-in-08 ! arcor-online ! net
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Yes please with all these cases.
Best
Xqt
----- Ursprüngliche Nachricht -----
Von: Morten Wang
Gesendet: 01.03.2013 17:32
An: Pywikipedia discussion list
Betreff: Re: [Pywikipedia-l] Rewrite branch,issue with user pages in aliased \
namespace
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 <nettrom@gmail.com> 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, <info@gno.de> wrote:
Fixes in r11139
best
xqt
----- Original Nachricht ----
Von: Morten Wang <nettrom@gmail.com>
An: Pywikipedia discussion list <pywikipedia-l@lists.wikimedia.org>
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, <info@gno.de> 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
> > Pywikipedia-l@lists.wikimedia.org
> > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
> >
> >
>
>
> --------------------------------
>
> _______________________________________________
> Pywikipedia-l mailing list
> Pywikipedia-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>
[Attachment #5 (unknown)]
<html><head><meta content="text/html; charset=utf-8" \
http-equiv="Content-Type"></head><body><div><div style="font-family: \
Calibri,sans-serif; font-size: 11pt;">Yes please with all these \
cases.<br><br>Best<br><br>Xqt<br></div></div><hr><span style="font-family: \
Tahoma,sans-serif; font-size: 10pt; font-weight: bold;">Von: </span><span \
style="font-family: Tahoma,sans-serif; font-size: 10pt;">Morten Wang</span><br><span \
style="font-family: Tahoma,sans-serif; font-size: 10pt; font-weight: bold;">Gesendet: \
</span><span style="font-family: Tahoma,sans-serif; font-size: 10pt;">01.03.2013 \
17:32</span><br><span style="font-family: Tahoma,sans-serif; font-size: 10pt; \
font-weight: bold;">An: </span><span style="font-family: Tahoma,sans-serif; \
font-size: 10pt;">Pywikipedia discussion list</span><br><span style="font-family: \
Tahoma,sans-serif; font-size: 10pt; font-weight: bold;">Betreff: </span><span \
style="font-family: Tahoma,sans-serif; font-size: 10pt;">Re: [Pywikipedia-l] Rewrite \
branch,issue with user pages in aliased namespace</span><br><br><div \
dir="ltr"><div>Found another bug related to this issue:</div><div><br></div><div>page \
= pywikibot.Page(site, \
u"Usuário:Vitorvicentevalente");</div><div>page.exists();<br>Traceback (most recent \
call last):<br> File "<stdin>", line 1, in <module><br> File \
"pywikibot/page.py", line 417, in exists<br> return \
self.site.page_exists(self)<br> File "pywikibot/site.py", line 1180, in \
page_exists<br> return page._pageid > 0<br>AttributeError: 'Page' object has no \
attribute '_pageid'<br><br></div><div>Let me know if it's easier to simply open a bug \
on SourceForge for this instead.<br></div><div> \
<br></div><div><br></div><div>Regards,</div><div>Morten</div><div><br></div></div><div \
class="gmail_extra"><br><br><div class="gmail_quote">On 28 February 2013 09:55, \
Morten Wang <span dir="ltr"><<a href="mailto:nettrom@gmail.com" \
target="_blank">nettrom@gmail.com</a>></span> wrote:<br> <blockquote \
style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, \
204); border-left-width: 1px; border-left-style: solid;" class="gmail_quote"><div \
dir="ltr"><div>[inadvertently only replied to xqt, sorry about double emails, thought \
I'd post to the list too]</div> <div class="im"><div><br></div>Awesome work, thanks \
for the speedy bugfix!<br><br>I noticed that it appears to also affect \
PreloadingGenerator, I get these warnings:<br>
WARNING: preloadpages: Query returned unexpected title \
'Usuário:Vitorvicentevalente'<br>WARNING: preloadpages: Query returned unexpected \
title 'Usuário:Vitorvicentevalente/Etiquetas'<br><br>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.<br>
<br><br>Regards,<br>Morten</div></div><div class="gmail_extra"><br><br><div \
class="gmail_quote"><div class="im">On 28 February 2013 04:31, <span \
dir="ltr"><<a href="mailto:info@gno.de" target="_blank">info@gno.de</a>></span> \
wrote:<br> </div><div><div class="h5"><blockquote style="margin: 0px 0px 0px 0.8ex; \
padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; \
border-left-style: solid;" class="gmail_quote"> Fixes in r11139<br>
<br>
best<br>
<div><br>
xqt<br>
<br>
<br>
----- Original Nachricht ----<br>
Von: Morten Wang <<a href="mailto:nettrom@gmail.com" \
target="_blank">nettrom@gmail.com</a>><br>
An: Pywikipedia discussion list <<a \
href="mailto:pywikipedia-l@lists.wikimedia.org" \
target="_blank">pywikipedia-l@lists.wikimedia.org</a>><br>
Datum: <a href="tel:27.02.2013%2020" target="_blank" \
value="+12702201320">27.02.2013 20</a>:46<br>
Betreff: Re: [Pywikipedia-l] Rewrite branch,<br>
</div><div> issue with user pages in aliased namespace<br>
<br>
</div><div>> Deleted the API cache and the cookie file, still get the same \
error.<br> > Making sure the site reloads the namespace info (by calling<br>
> site._getsiteinfo(force=True)) didn't help either.<br>
><br>
> It's line 1711 in site.py (method loadrevisions) that's throwing the<br>
> exception, in case that wasn't already obvious.<br>
><br>
><br>
> Regards,<br>
> Morten<br>
><br>
><br>
> On 27 February 2013 12:28, <<a href="mailto:info@gno.de" \
target="_blank">info@gno.de</a>> wrote:<br> ><br>
> > You should delete the API cache first.<br>
> ><br>
> > xqt<br>
</div>> > ------------------------------<br>
<div><div>> > Von: Morten Wang<br>
> > Gesendet: <a href="tel:27.02.2013%2016" target="_blank" \
value="+12702201316">27.02.2013 16</a>:39<br> > > An: Pywikipedia discussion \
list<br> > > Betreff: [Pywikipedia-l] Rewrite branch,issue with user pages in \
aliased<br> > > namespace<br>
> ><br>
> ><br>
> > Hi all,<br>
> ><br>
> > I've run into an interesting issue on Portuguese Wikipedia, with a user<br>
> > page that's in the aliased user namespace:<br>
> ><br>
> > import pywikibot;<br>
> > site = pywikibot.getSite('pt');<br>
> > page = pywikibot.Page(site, u"Usuário:Vitorvicentevalente");<br>
> > page.title();<br>
> > u'Usu\xe1rio(a):Vitorvicentevalente'<br>
> > page.get()<br>
> > [NOTE: callback trace removed for brevity]<br>
> > pywikibot.exceptions.Error: loadrevisions: Query on<br>
> > [[pt:Usuário(a):Vitorvicentevalente]] returned data on<br>
> > 'Usuário:Vitorvicentevalente'<br>
> ><br>
> > According to the API "Usuário" is a valid namespace alias[1]. Is \
there<br> > an<br>
> > easy workaround or fix here?<br>
> ><br>
> > Also, I've noticed this is not an issue in trunk, it's just the rewrite<br>
> > branch that produces this error.<br>
> ><br>
> ><br>
> > Footnotes:<br>
> > 1: ref:<br>
> ><br>
> <a href="http://pt.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=general%7C" \
target="_blank">http://pt.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=general|</a><br>
> namespaces|namespacealiases<br>
> ><br>
> ><br>
> > Regards,<br>
> > Morten<br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Pywikipedia-l mailing list<br>
> > <a href="mailto:Pywikipedia-l@lists.wikimedia.org" \
target="_blank">Pywikipedia-l@lists.wikimedia.org</a><br> > > <a \
href="https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l" \
target="_blank">https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l</a><br> \
> ><br> > ><br>
><br>
><br>
</div></div>> --------------------------------<br>
<div><div>><br>
> _______________________________________________<br>
> Pywikipedia-l mailing list<br>
> <a href="mailto:Pywikipedia-l@lists.wikimedia.org" \
target="_blank">Pywikipedia-l@lists.wikimedia.org</a><br> > <a \
href="https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l" \
target="_blank">https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l</a><br> \
><br> </div></div></blockquote></div></div></div><br></div>
</blockquote></div><br></div>
</body></html>
[Attachment #6 (text/plain)]
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic