[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 "&lt;stdin&gt;", line 1, in &lt;module&gt;<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 &gt; 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">&lt;<a href="mailto:nettrom@gmail.com" \
target="_blank">nettrom@gmail.com</a>&gt;</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">&lt;<a href="mailto:info@gno.de" target="_blank">info@gno.de</a>&gt;</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: &nbsp; &nbsp; Morten Wang &lt;<a href="mailto:nettrom@gmail.com" \
                target="_blank">nettrom@gmail.com</a>&gt;<br>
An: &nbsp; &nbsp; &nbsp;Pywikipedia discussion list &lt;<a \
href="mailto:pywikipedia-l@lists.wikimedia.org" \
                target="_blank">pywikipedia-l@lists.wikimedia.org</a>&gt;<br>
Datum: &nbsp; <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>&nbsp; &nbsp; &nbsp; &nbsp; issue with user pages in aliased namespace<br>
<br>
</div><div>&gt; Deleted the API cache and the cookie file, still get the same \
error.<br> &gt; &nbsp;Making sure the site reloads the namespace info (by calling<br>
&gt; &nbsp;site._getsiteinfo(force=True)) didn't help either.<br>
&gt;<br>
&gt; It's line 1711 in site.py (method loadrevisions) that's throwing the<br>
&gt; exception, in case that wasn't already obvious.<br>
&gt;<br>
&gt;<br>
&gt; Regards,<br>
&gt; Morten<br>
&gt;<br>
&gt;<br>
&gt; On 27 February 2013 12:28, &lt;<a href="mailto:info@gno.de" \
target="_blank">info@gno.de</a>&gt; wrote:<br> &gt;<br>
&gt; &gt; You should delete the API cache first.<br>
&gt; &gt;<br>
&gt; &gt; xqt<br>
</div>&gt; &gt; ------------------------------<br>
<div><div>&gt; &gt; Von: Morten Wang<br>
&gt; &gt; Gesendet: <a href="tel:27.02.2013%2016" target="_blank" \
value="+12702201316">27.02.2013 16</a>:39<br> &gt; &gt; An: Pywikipedia discussion \
list<br> &gt; &gt; Betreff: [Pywikipedia-l] Rewrite branch,issue with user pages in \
aliased<br> &gt; &gt; namespace<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Hi all,<br>
&gt; &gt;<br>
&gt; &gt; I've run into an interesting issue on Portuguese Wikipedia, with a user<br>
&gt; &gt; page that's in the aliased user namespace:<br>
&gt; &gt;<br>
&gt; &gt; import pywikibot;<br>
&gt; &gt; site = pywikibot.getSite('pt');<br>
&gt; &gt; page = pywikibot.Page(site, u"Usuário:Vitorvicentevalente");<br>
&gt; &gt; page.title();<br>
&gt; &gt; u'Usu\xe1rio(a):Vitorvicentevalente'<br>
&gt; &gt; page.get()<br>
&gt; &gt; [NOTE: callback trace removed for brevity]<br>
&gt; &gt; pywikibot.exceptions.Error: loadrevisions: Query on<br>
&gt; &gt; [[pt:Usuário(a):Vitorvicentevalente]] returned data on<br>
&gt; &gt; 'Usuário:Vitorvicentevalente'<br>
&gt; &gt;<br>
&gt; &gt; According to the API "Usuário" is a valid namespace alias[1]. &nbsp;Is \
there<br> &gt; an<br>
&gt; &gt; easy workaround or fix here?<br>
&gt; &gt;<br>
&gt; &gt; Also, I've noticed this is not an issue in trunk, it's just the rewrite<br>
&gt; &gt; branch that produces this error.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Footnotes:<br>
&gt; &gt; 1: ref:<br>
&gt; &gt;<br>
&gt; <a href="http://pt.wikipedia.org/w/api.php?action=query&amp;meta=siteinfo&amp;siprop=general%7C" \
target="_blank">http://pt.wikipedia.org/w/api.php?action=query&amp;meta=siteinfo&amp;siprop=general|</a><br>
 &gt; namespaces|namespacealiases<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Regards,<br>
&gt; &gt; Morten<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Pywikipedia-l mailing list<br>
&gt; &gt; <a href="mailto:Pywikipedia-l@lists.wikimedia.org" \
target="_blank">Pywikipedia-l@lists.wikimedia.org</a><br> &gt; &gt; <a \
href="https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l" \
target="_blank">https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l</a><br> \
&gt; &gt;<br> &gt; &gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; --------------------------------<br>
<div><div>&gt;<br>
&gt; _______________________________________________<br>
&gt; Pywikipedia-l mailing list<br>
&gt; <a href="mailto:Pywikipedia-l@lists.wikimedia.org" \
target="_blank">Pywikipedia-l@lists.wikimedia.org</a><br> &gt; <a \
href="https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l" \
target="_blank">https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l</a><br> \
&gt;<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