Bugs item #2795879, was opened at 2009-05-24 01:38
Message generated for change (Comment added) made by ronga
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2795879&group_…
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: General
Group: None
Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Ronga (ronga)
Assigned to: Nobody/Anonymous (nobody)
Summary: AttributeError at replace.py
Initial Comment:
Command:
replace.py -start:"Template:!" "File:Cross.svg" "File:Cross red.svg"
Error message:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
Details:
C:\pywikipedia>replace.py -start:"Template:!" "File:Cross.svg" "File:Cross red.svg"
Traceback (most recent call last):
File "C:\pywikipedia\pagegenerators.py", line 787, in __iter__
for page in self.wrapped_gen:
File "C:\pywikipedia\pagegenerators.py", line 719, in DuplicateFilterPageGener
ator
for page in generator:
File "C:\pywikipedia\pagegenerators.py", line 250, in AllpagesPageGenerator
for page in site.allpages(start = start, namespace = namespace, includeredir
ects = includeredirects):
File "C:\pywikipedia\wikipedia.py", line 5508, in allpages
for p in soup.api.query.allpages:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
File version:
Pywikipedia nightly:pywikipedia (r6854, May 07 2009, 13:07:14)
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
----------------------------------------------------------------------
Comment By: Ronga (ronga)
Date: 2009-05-26 20:53
Message:
It seems the problem is solved now.
Thanks for your help.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-25 18:50
Message:
okay thanks. closing then.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-25 18:40
Message:
There is the bug #2577598 - «AttributeError: 'NoneType' object has no
attribute 'query'».
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-25 18:35
Message:
Reopening.
It happens to me, on wikimedia projects, with the latest versions.
Ronga's problem was probably because of a wrong family file, but we still
need to find out why it can happen on WM sites (at least use more useful
error messages)
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-25 18:13
Message:
Attached a fixed family file. Problem resolved, bug closed.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-25 12:59
Message:
Hello!
Your family file is wrong. Have you read
http://meta.wikimedia.org/wiki/Pywikipedia_bot_on_non-Wikimedia_projects ?
It might help +)
The addresses of index and api are http://bestbrute.wikia.com/index.php
and http://bestbrute.wikia.com/api.php which means that the scriptpath
should be '' :
def scriptpath(self, code):
return ''
With this script path set, you don't need to override path(), or apipath()
and things will work for you.
----------------------------------------------------------------------
Comment By: Ronga (ronga)
Date: 2009-05-25 11:59
Message:
This is where I run your robot scripts:
http://bestbrute.wikia.com/
BestBrute - MyBrute Wiki - custom family file
File has been attached. Please check.
It seems this problem always happen on me. It's not an occasional error.
This bug also affect quite a few commands, not just replace.py -start:
I remember I tried -titleregex in another py file. I saw the same error
message.
So does anyone know how to workaround it? (Perhaps using other commands).
I want to tell the robot to check all templates, but the -start command
doesn't work for me. What else could I use?
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-24 12:20
Message:
It also happens to me from time to time, on wikimedia project.
I'm not sure of what happens here, I'm not familiar enough with the api.
Checking for soup.api is not None , and retry if it's None could do the
trick, but once again, we're inserting magic tricks to use the api, when it
would be better to focus on porting our code base to the rewrite branch...
:/
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-24 07:35
Message:
You should attach your custom family file (families/bestbrute_family.py) so
I can reproduce this bug.
----------------------------------------------------------------------
Comment By: Ronga (ronga)
Date: 2009-05-24 04:39
Message:
===================================================
Update:
I got the latest version from http://toolserver.org/~valhallasw/pywiki/.
Extracted to the same folder. Selected "replace all"
Still the same error persists.
Reply @ Date: 2009-05-24 02:10
Sender: cosoleto
> please include, as well as the traceback, family, language
What traceback? Isn't the message included it already?
family = 'bestbrute'
mylang = 'en'
> last 10 lines before that error is raised
The following has shown all message.
The whole message:
C:\pywikipedia>replace.py -start:"Template:!" "File:Cross.svg" "File:Cross
red.s
vg"
Traceback (most recent call last):
File "C:\pywikipedia\pagegenerators.py", line 787, in __iter__
for page in self.wrapped_gen:
File "C:\pywikipedia\pagegenerators.py", line 719, in
DuplicateFilterPageGener
ator
for page in generator:
File "C:\pywikipedia\pagegenerators.py", line 250, in
AllpagesPageGenerator
for page in site.allpages(start = start, namespace = namespace,
includeredir
ects = includeredirects):
File "C:\pywikipedia\wikipedia.py", line 5512, in allpages
for p in soup.api.query.allpages:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
C:\pywikipedia>version.py
Pywikipedia nightly:pywikipedia (r6915, May 22 2009, 23:45:12)
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit
(Intel)]
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-24 02:10
Message:
Looks as a problem already reported but I don't remember whether it is
fixed or not. You should update your PyWikipediaBot version as it isn't up
to date (15 days old) and report again the problem here if persists. In
case, please include, as well as the traceback, family, language and last
10 lines before that error is raised.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2795879&group_…
Feature Requests item #2795933, was opened at 2009-05-23 23:00
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=2795933&group_…
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: None
Group: None
>Status: Closed
Priority: 5
Private: No
Submitted By: Ronga (ronga)
Assigned to: Nobody/Anonymous (nobody)
Summary: Documentation mistakes at add_text.py
Initial Comment:
I have improved the documentation of add_text.py a bit, and fix a few mistakes found.
I would like to propose this change to be applied.
You may view the diff online here:
http://botwiki.sno.cc/w/index.php?title=Python%3AAdd_text.py&diff=5955&oldi…
The new text:
====================================================================
This is a Bot written by Filnik to add a text at the end of the page but above categories,
interwiki and template for the stars of the interwiki (default).
Alternatively it may also add a text at the top of the page.
These command line parameters can be used to specify which pages to work on:
¶ms;
Furthermore, the following command line parameters are supported:
-page Use a page as generator
-text Define which text to add
-summary Define the summary to use
-except Use a regex to check if the text is already in the page
-excepturl Use the html page as text where you want to see if there's the text, not the wiki-page.
-newimages Add text in the new images
-untagged Add text in the images that don't have any license template
-always If used, the bot won't ask if it should add the text specified
-up If used, put the text at the very top of the page
--- Example ---
1.
# This is a script to add a template to the very top of the pages with category:catname
python add_text.py -cat:catname -summary:"Bot: Adding a template" -text:"{{Something}}" -except:"\{\{([Tt]emplate:|)[Ss]omething" -up
2.
# Command used on it.wikipedia to put the template in the page without any category.
# But warning! Put it in a line, otherwise it won't work correctly.
python add_text.py -excepturl:"class='catlinks'>" -uncat -text:"{{Categorizzare}}"
-except:"\{\{([Tt]emplate:|)[Cc]ategorizzare" -summary:"Bot: Aggiungo template Categorizzare"
----------------------------------------------------------------------
>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-26 12:56
Message:
done, in r6922 :)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=2795933&group_…
Bugs item #2786042, was opened at 2009-05-03 13:43
Message generated for change (Settings changed) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2786042&group_…
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: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: xqt (xqt)
Assigned to: Nobody/Anonymous (nobody)
Summary: family.py: Wrong File: translation on wo-wiki
Initial Comment:
__version__='$Id: family.py 6725 2009-04-26 08:31:00Z nicdumz $'
There is a wrong Image: or File: translation on wo-wiki (see message at http://wo.wikipedia.org/wiki/Waxtaani_j%C3%ABfandikukat:Xqt and http://wo.wikipedia.org/w/index.php?title=Saytubiddiw&diff=prev&oldid=35829 as an example). Maybe it comes from this NS 7 translation
'wo': [u'Waxtaani dencukaay', u'Dencukaay'],
but it should be
'wo': [u'Waxtaani dencukaay'],
only.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2009-05-15 09:33
Message:
It seems all is quite right:
http://wo.wikipedia.org/w/index.php?title=J%C3%ABfandikukat%3AXqt&diff=3708…
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-12 11:09
Message:
I'm not sure of what happened. I changed the NS 7 localization in r6873.
Can you comment back on that issue if it happens again after this? Thanks.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2786042&group_…
Bugs item #2796534, was opened at 2009-05-25 20:39
Message generated for change (Settings changed) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2796534&group_…
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: category
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: MGA73 (mga73)
Assigned to: Nobody/Anonymous (nobody)
Summary: Category_redirect adds template {{K}} ..
Initial Comment:
Category_redirect adds template {{K}} on da-wiki instead of {{Kategoriomdirigering}} when changeing hard redirects to category redirect. See http://da.wikipedia.org/w/index.php?title=Kategori%3AItalienske_historikere… . Hope you can fix it :-) /MGA73
----------------------------------------------------------------------
>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-26 02:47
Message:
Thanks for the report =)
should be fixed in r6921 !
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2796534&group_…
Bugs item #2796534, was opened at 2009-05-25 20:39
Message generated for change (Tracker Item Submitted) made by mga73
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2796534&group_…
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: category
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: MGA73 (mga73)
Assigned to: Nobody/Anonymous (nobody)
Summary: Category_redirect adds template {{K}} ..
Initial Comment:
Category_redirect adds template {{K}} on da-wiki instead of {{Kategoriomdirigering}} when changeing hard redirects to category redirect. See http://da.wikipedia.org/w/index.php?title=Kategori%3AItalienske_historikere… . Hope you can fix it :-) /MGA73
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2796534&group_…
Bugs item #2795879, was opened at 2009-05-23 19:38
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2795879&group_…
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: General
Group: None
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Ronga (ronga)
Assigned to: Nobody/Anonymous (nobody)
Summary: AttributeError at replace.py
Initial Comment:
Command:
replace.py -start:"Template:!" "File:Cross.svg" "File:Cross red.svg"
Error message:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
Details:
C:\pywikipedia>replace.py -start:"Template:!" "File:Cross.svg" "File:Cross red.svg"
Traceback (most recent call last):
File "C:\pywikipedia\pagegenerators.py", line 787, in __iter__
for page in self.wrapped_gen:
File "C:\pywikipedia\pagegenerators.py", line 719, in DuplicateFilterPageGener
ator
for page in generator:
File "C:\pywikipedia\pagegenerators.py", line 250, in AllpagesPageGenerator
for page in site.allpages(start = start, namespace = namespace, includeredir
ects = includeredirects):
File "C:\pywikipedia\wikipedia.py", line 5508, in allpages
for p in soup.api.query.allpages:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
File version:
Pywikipedia nightly:pywikipedia (r6854, May 07 2009, 13:07:14)
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
----------------------------------------------------------------------
>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-25 12:50
Message:
okay thanks. closing then.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-25 12:40
Message:
There is the bug #2577598 - «AttributeError: 'NoneType' object has no
attribute 'query'».
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-25 12:35
Message:
Reopening.
It happens to me, on wikimedia projects, with the latest versions.
Ronga's problem was probably because of a wrong family file, but we still
need to find out why it can happen on WM sites (at least use more useful
error messages)
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-25 12:13
Message:
Attached a fixed family file. Problem resolved, bug closed.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-25 06:59
Message:
Hello!
Your family file is wrong. Have you read
http://meta.wikimedia.org/wiki/Pywikipedia_bot_on_non-Wikimedia_projects ?
It might help +)
The addresses of index and api are http://bestbrute.wikia.com/index.php
and http://bestbrute.wikia.com/api.php which means that the scriptpath
should be '' :
def scriptpath(self, code):
return ''
With this script path set, you don't need to override path(), or apipath()
and things will work for you.
----------------------------------------------------------------------
Comment By: Ronga (ronga)
Date: 2009-05-25 05:59
Message:
This is where I run your robot scripts:
http://bestbrute.wikia.com/
BestBrute - MyBrute Wiki - custom family file
File has been attached. Please check.
It seems this problem always happen on me. It's not an occasional error.
This bug also affect quite a few commands, not just replace.py -start:
I remember I tried -titleregex in another py file. I saw the same error
message.
So does anyone know how to workaround it? (Perhaps using other commands).
I want to tell the robot to check all templates, but the -start command
doesn't work for me. What else could I use?
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-24 06:20
Message:
It also happens to me from time to time, on wikimedia project.
I'm not sure of what happens here, I'm not familiar enough with the api.
Checking for soup.api is not None , and retry if it's None could do the
trick, but once again, we're inserting magic tricks to use the api, when it
would be better to focus on porting our code base to the rewrite branch...
:/
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-24 01:35
Message:
You should attach your custom family file (families/bestbrute_family.py) so
I can reproduce this bug.
----------------------------------------------------------------------
Comment By: Ronga (ronga)
Date: 2009-05-23 22:39
Message:
===================================================
Update:
I got the latest version from http://toolserver.org/~valhallasw/pywiki/.
Extracted to the same folder. Selected "replace all"
Still the same error persists.
Reply @ Date: 2009-05-24 02:10
Sender: cosoleto
> please include, as well as the traceback, family, language
What traceback? Isn't the message included it already?
family = 'bestbrute'
mylang = 'en'
> last 10 lines before that error is raised
The following has shown all message.
The whole message:
C:\pywikipedia>replace.py -start:"Template:!" "File:Cross.svg" "File:Cross
red.s
vg"
Traceback (most recent call last):
File "C:\pywikipedia\pagegenerators.py", line 787, in __iter__
for page in self.wrapped_gen:
File "C:\pywikipedia\pagegenerators.py", line 719, in
DuplicateFilterPageGener
ator
for page in generator:
File "C:\pywikipedia\pagegenerators.py", line 250, in
AllpagesPageGenerator
for page in site.allpages(start = start, namespace = namespace,
includeredir
ects = includeredirects):
File "C:\pywikipedia\wikipedia.py", line 5512, in allpages
for p in soup.api.query.allpages:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
C:\pywikipedia>version.py
Pywikipedia nightly:pywikipedia (r6915, May 22 2009, 23:45:12)
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit
(Intel)]
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-23 20:10
Message:
Looks as a problem already reported but I don't remember whether it is
fixed or not. You should update your PyWikipediaBot version as it isn't up
to date (15 days old) and report again the problem here if persists. In
case, please include, as well as the traceback, family, language and last
10 lines before that error is raised.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2795879&group_…
Bugs item #2577598, was opened at 2009-02-07 16:49
Message generated for change (Comment added) made by cosoleto
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2577598&group_…
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: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Mikko Silvonen (silvonen)
Assigned to: Nobody/Anonymous (nobody)
Summary: AttributeError: 'NoneType' object has no attribute 'query'
Initial Comment:
My autonomous interwiki run on all fiwiki categories crashed today with the following error.
...
======Post-processing [[fi:Luokka:Cradle of Filth]]======
Updating links on page [[es:Categoría:Cradle of Filth]].
No changes needed
Updating links on page [[ja:Category:kureidoru obu fuirusu]].
No changes needed
Updating links on page [[sk:Kategória:Cradle of Filth]].
No changes needed
Updating links on page [[en:Category:Cradle of Filth]].
No changes needed
Updating links on page [[fi:Luokka:Cradle of Filth]].
No changes needed
NOTE: The first unfinished subject is [[fi:Luokka:Cradle of Filthin albumit]]
NOTE: Number of pages queued is 99, trying to add 60 more.
Dump fi (wikipedia) saved
Traceback (most recent call last):
File "interwiki.py", line 1818, in <module>
bot.run()
File "interwiki.py", line 1538, in run
self.queryStep()
File "interwiki.py", line 1512, in queryStep
self.oneQuery()
File "interwiki.py", line 1480, in oneQuery
site = self.selectQuerySite()
File "interwiki.py", line 1454, in selectQuerySite
self.generateMore(globalvar.maxquerysize - mycount)
File "interwiki.py", line 1388, in generateMore
page = self.pageGenerator.next()
File "c:\svn\pywikipedia\pagegenerators.py", line 670, in NamespaceFilterPageGenerator
for page in generator:
File "c:\svn\pywikipedia\pagegenerators.py", line 688, in DuplicateFilterPageGenerator
for page in generator:
File "c:\svn\pywikipedia\pagegenerators.py", line 239, in AllpagesPageGenerator
for page in site.allpages(start = start, namespace = namespace, includeredirects = includeredirects):
File "c:\svn\pywikipedia\wikipedia.py", line 5424, in allpages
for p in soup.api.query.allpages:
AttributeError: 'NoneType' object has no attribute 'query'
>python version.py
Pywikipedia [http] trunk/pywikipedia (r6334, Feb 06 2009, 16:42:40)
Python 2.5.1 (r251:54863, May 1 2007, 17:47:05) [MSC v.1310 32 bit (Intel)]
----------------------------------------------------------------------
>Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-25 12:43
Message:
Maybe this is due to unrecognized "server has a problem" error.
----------------------------------------------------------------------
Comment By: Michael Heggen (twisted86)
Date: 2009-03-16 20:50
Message:
I am also getting this error when trying the following:
python replace.py -start:! epee épée
(or any other replace query using "start:!", for that matter)
Exact error:
Checked for running processes. 1 processes currently running, including
the current process.
Traceback (most recent call last):
File "/Users/michael/pywikipedia/pagegenerators.py", line 776, in
__iter__
for page in self.wrapped_gen:
File "/Users/michael/pywikipedia/pagegenerators.py", line 709, in
DuplicateFilterPageGenerator
for page in generator:
File "/Users/michael/pywikipedia/pagegenerators.py", line 248, in
AllpagesPageGenerator
for page in site.allpages(start = start, namespace = namespace,
includeredirects = includeredirects):
File "/Users/michael/pywikipedia/wikipedia.py", line 5503, in allpages
for p in soup.api.query.allpages:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
I am using:
Pywikipedia [http] trunk/pywikipedia (r6508, Mar 15 2009, 12:35:14)
Python 2.5.1 (r251:54863, Jan 13 2009, 10:26:13)
[GCC 4.0.1 (Apple Inc. build 5465)]
MediaWiki 1.14.0
PHP 5.2.8 (cgi-fcgi)
MySQL 5.0.67.d7-ourdelta-log
I just installed PyWikipedia, so this is pretty frustrating. If I knew how
to do anything in Python beyond "Hello, world!", I'd try to fix it, but I
am 15 years out of practice on coding anything.
----------------------------------------------------------------------
Comment By: Michael Heggen (twisted86)
Date: 2009-03-16 20:49
Message:
I am also getting this error when trying the following:
python replace.py -start:! epee épée
(or any other replace query using "start:!", for that matter)
Exact error:
Checked for running processes. 1 processes currently running, including
the current process.
Traceback (most recent call last):
File "/Users/michael/pywikipedia/pagegenerators.py", line 776, in
__iter__
for page in self.wrapped_gen:
File "/Users/michael/pywikipedia/pagegenerators.py", line 709, in
DuplicateFilterPageGenerator
for page in generator:
File "/Users/michael/pywikipedia/pagegenerators.py", line 248, in
AllpagesPageGenerator
for page in site.allpages(start = start, namespace = namespace,
includeredirects = includeredirects):
File "/Users/michael/pywikipedia/wikipedia.py", line 5503, in allpages
for p in soup.api.query.allpages:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
I am using:
Pywikipedia [http] trunk/pywikipedia (r6508, Mar 15 2009, 12:35:14)
Python 2.5.1 (r251:54863, Jan 13 2009, 10:26:13)
[GCC 4.0.1 (Apple Inc. build 5465)]
MediaWiki 1.14.0
PHP 5.2.8 (cgi-fcgi)
MySQL 5.0.67.d7-ourdelta-log
I just installed PyWikipedia, so this is pretty frustrating. If I knew how
to do anything in Python beyond "Hello, world!", I'd try to fix it, but I
am 15 years out of practice on coding anything.
----------------------------------------------------------------------
Comment By: Multichill (multichill)
Date: 2009-02-07 17:37
Message:
I had the same error yesterday. There seems to be something wrong with the
allpages generator.
The api was changed recently, maybe that has something to do with it.
soup = BeautifulSoup(text, convertEntities=BeautifulSoup.HTML_ENTITIES)
(line 5421 in wikipedia.py) should return an object.
Looks like soup exists, but api doesn't exist. That's strange. When i look
at http://commons.wikimedia.org/w/api.php api is the root element.
We should probably build in some checks to see if we got everything
instead of assuming we get it right straight away.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2577598&group_…
Bugs item #2795879, was opened at 2009-05-23 19:38
Message generated for change (Comment added) made by cosoleto
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2795879&group_…
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: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ronga (ronga)
Assigned to: Nobody/Anonymous (nobody)
Summary: AttributeError at replace.py
Initial Comment:
Command:
replace.py -start:"Template:!" "File:Cross.svg" "File:Cross red.svg"
Error message:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
Details:
C:\pywikipedia>replace.py -start:"Template:!" "File:Cross.svg" "File:Cross red.svg"
Traceback (most recent call last):
File "C:\pywikipedia\pagegenerators.py", line 787, in __iter__
for page in self.wrapped_gen:
File "C:\pywikipedia\pagegenerators.py", line 719, in DuplicateFilterPageGener
ator
for page in generator:
File "C:\pywikipedia\pagegenerators.py", line 250, in AllpagesPageGenerator
for page in site.allpages(start = start, namespace = namespace, includeredir
ects = includeredirects):
File "C:\pywikipedia\wikipedia.py", line 5508, in allpages
for p in soup.api.query.allpages:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
File version:
Pywikipedia nightly:pywikipedia (r6854, May 07 2009, 13:07:14)
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
----------------------------------------------------------------------
>Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-25 12:40
Message:
There is the bug #2577598 - «AttributeError: 'NoneType' object has no
attribute 'query'».
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-25 12:35
Message:
Reopening.
It happens to me, on wikimedia projects, with the latest versions.
Ronga's problem was probably because of a wrong family file, but we still
need to find out why it can happen on WM sites (at least use more useful
error messages)
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-25 12:13
Message:
Attached a fixed family file. Problem resolved, bug closed.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-25 06:59
Message:
Hello!
Your family file is wrong. Have you read
http://meta.wikimedia.org/wiki/Pywikipedia_bot_on_non-Wikimedia_projects ?
It might help +)
The addresses of index and api are http://bestbrute.wikia.com/index.php
and http://bestbrute.wikia.com/api.php which means that the scriptpath
should be '' :
def scriptpath(self, code):
return ''
With this script path set, you don't need to override path(), or apipath()
and things will work for you.
----------------------------------------------------------------------
Comment By: Ronga (ronga)
Date: 2009-05-25 05:59
Message:
This is where I run your robot scripts:
http://bestbrute.wikia.com/
BestBrute - MyBrute Wiki - custom family file
File has been attached. Please check.
It seems this problem always happen on me. It's not an occasional error.
This bug also affect quite a few commands, not just replace.py -start:
I remember I tried -titleregex in another py file. I saw the same error
message.
So does anyone know how to workaround it? (Perhaps using other commands).
I want to tell the robot to check all templates, but the -start command
doesn't work for me. What else could I use?
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-24 06:20
Message:
It also happens to me from time to time, on wikimedia project.
I'm not sure of what happens here, I'm not familiar enough with the api.
Checking for soup.api is not None , and retry if it's None could do the
trick, but once again, we're inserting magic tricks to use the api, when it
would be better to focus on porting our code base to the rewrite branch...
:/
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-24 01:35
Message:
You should attach your custom family file (families/bestbrute_family.py) so
I can reproduce this bug.
----------------------------------------------------------------------
Comment By: Ronga (ronga)
Date: 2009-05-23 22:39
Message:
===================================================
Update:
I got the latest version from http://toolserver.org/~valhallasw/pywiki/.
Extracted to the same folder. Selected "replace all"
Still the same error persists.
Reply @ Date: 2009-05-24 02:10
Sender: cosoleto
> please include, as well as the traceback, family, language
What traceback? Isn't the message included it already?
family = 'bestbrute'
mylang = 'en'
> last 10 lines before that error is raised
The following has shown all message.
The whole message:
C:\pywikipedia>replace.py -start:"Template:!" "File:Cross.svg" "File:Cross
red.s
vg"
Traceback (most recent call last):
File "C:\pywikipedia\pagegenerators.py", line 787, in __iter__
for page in self.wrapped_gen:
File "C:\pywikipedia\pagegenerators.py", line 719, in
DuplicateFilterPageGener
ator
for page in generator:
File "C:\pywikipedia\pagegenerators.py", line 250, in
AllpagesPageGenerator
for page in site.allpages(start = start, namespace = namespace,
includeredir
ects = includeredirects):
File "C:\pywikipedia\wikipedia.py", line 5512, in allpages
for p in soup.api.query.allpages:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
C:\pywikipedia>version.py
Pywikipedia nightly:pywikipedia (r6915, May 22 2009, 23:45:12)
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit
(Intel)]
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-23 20:10
Message:
Looks as a problem already reported but I don't remember whether it is
fixed or not. You should update your PyWikipediaBot version as it isn't up
to date (15 days old) and report again the problem here if persists. In
case, please include, as well as the traceback, family, language and last
10 lines before that error is raised.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2795879&group_…
Bugs item #2795879, was opened at 2009-05-23 19:38
Message generated for change (Settings changed) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2795879&group_…
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: General
Group: None
>Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ronga (ronga)
Assigned to: Nobody/Anonymous (nobody)
Summary: AttributeError at replace.py
Initial Comment:
Command:
replace.py -start:"Template:!" "File:Cross.svg" "File:Cross red.svg"
Error message:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
Details:
C:\pywikipedia>replace.py -start:"Template:!" "File:Cross.svg" "File:Cross red.svg"
Traceback (most recent call last):
File "C:\pywikipedia\pagegenerators.py", line 787, in __iter__
for page in self.wrapped_gen:
File "C:\pywikipedia\pagegenerators.py", line 719, in DuplicateFilterPageGener
ator
for page in generator:
File "C:\pywikipedia\pagegenerators.py", line 250, in AllpagesPageGenerator
for page in site.allpages(start = start, namespace = namespace, includeredir
ects = includeredirects):
File "C:\pywikipedia\wikipedia.py", line 5508, in allpages
for p in soup.api.query.allpages:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
File version:
Pywikipedia nightly:pywikipedia (r6854, May 07 2009, 13:07:14)
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
----------------------------------------------------------------------
>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-25 12:35
Message:
Reopening.
It happens to me, on wikimedia projects, with the latest versions.
Ronga's problem was probably because of a wrong family file, but we still
need to find out why it can happen on WM sites (at least use more useful
error messages)
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-25 12:13
Message:
Attached a fixed family file. Problem resolved, bug closed.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-25 06:59
Message:
Hello!
Your family file is wrong. Have you read
http://meta.wikimedia.org/wiki/Pywikipedia_bot_on_non-Wikimedia_projects ?
It might help +)
The addresses of index and api are http://bestbrute.wikia.com/index.php
and http://bestbrute.wikia.com/api.php which means that the scriptpath
should be '' :
def scriptpath(self, code):
return ''
With this script path set, you don't need to override path(), or apipath()
and things will work for you.
----------------------------------------------------------------------
Comment By: Ronga (ronga)
Date: 2009-05-25 05:59
Message:
This is where I run your robot scripts:
http://bestbrute.wikia.com/
BestBrute - MyBrute Wiki - custom family file
File has been attached. Please check.
It seems this problem always happen on me. It's not an occasional error.
This bug also affect quite a few commands, not just replace.py -start:
I remember I tried -titleregex in another py file. I saw the same error
message.
So does anyone know how to workaround it? (Perhaps using other commands).
I want to tell the robot to check all templates, but the -start command
doesn't work for me. What else could I use?
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-24 06:20
Message:
It also happens to me from time to time, on wikimedia project.
I'm not sure of what happens here, I'm not familiar enough with the api.
Checking for soup.api is not None , and retry if it's None could do the
trick, but once again, we're inserting magic tricks to use the api, when it
would be better to focus on porting our code base to the rewrite branch...
:/
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-24 01:35
Message:
You should attach your custom family file (families/bestbrute_family.py) so
I can reproduce this bug.
----------------------------------------------------------------------
Comment By: Ronga (ronga)
Date: 2009-05-23 22:39
Message:
===================================================
Update:
I got the latest version from http://toolserver.org/~valhallasw/pywiki/.
Extracted to the same folder. Selected "replace all"
Still the same error persists.
Reply @ Date: 2009-05-24 02:10
Sender: cosoleto
> please include, as well as the traceback, family, language
What traceback? Isn't the message included it already?
family = 'bestbrute'
mylang = 'en'
> last 10 lines before that error is raised
The following has shown all message.
The whole message:
C:\pywikipedia>replace.py -start:"Template:!" "File:Cross.svg" "File:Cross
red.s
vg"
Traceback (most recent call last):
File "C:\pywikipedia\pagegenerators.py", line 787, in __iter__
for page in self.wrapped_gen:
File "C:\pywikipedia\pagegenerators.py", line 719, in
DuplicateFilterPageGener
ator
for page in generator:
File "C:\pywikipedia\pagegenerators.py", line 250, in
AllpagesPageGenerator
for page in site.allpages(start = start, namespace = namespace,
includeredir
ects = includeredirects):
File "C:\pywikipedia\wikipedia.py", line 5512, in allpages
for p in soup.api.query.allpages:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
C:\pywikipedia>version.py
Pywikipedia nightly:pywikipedia (r6915, May 22 2009, 23:45:12)
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit
(Intel)]
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-23 20:10
Message:
Looks as a problem already reported but I don't remember whether it is
fixed or not. You should update your PyWikipediaBot version as it isn't up
to date (15 days old) and report again the problem here if persists. In
case, please include, as well as the traceback, family, language and last
10 lines before that error is raised.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2795879&group_…
Bugs item #2795879, was opened at 2009-05-23 19:38
Message generated for change (Comment added) made by cosoleto
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2795879&group_…
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: General
Group: None
>Status: Closed
Resolution: None
>Priority: 5
Private: No
Submitted By: Ronga (ronga)
Assigned to: Nobody/Anonymous (nobody)
Summary: AttributeError at replace.py
Initial Comment:
Command:
replace.py -start:"Template:!" "File:Cross.svg" "File:Cross red.svg"
Error message:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
Details:
C:\pywikipedia>replace.py -start:"Template:!" "File:Cross.svg" "File:Cross red.svg"
Traceback (most recent call last):
File "C:\pywikipedia\pagegenerators.py", line 787, in __iter__
for page in self.wrapped_gen:
File "C:\pywikipedia\pagegenerators.py", line 719, in DuplicateFilterPageGener
ator
for page in generator:
File "C:\pywikipedia\pagegenerators.py", line 250, in AllpagesPageGenerator
for page in site.allpages(start = start, namespace = namespace, includeredir
ects = includeredirects):
File "C:\pywikipedia\wikipedia.py", line 5508, in allpages
for p in soup.api.query.allpages:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
File version:
Pywikipedia nightly:pywikipedia (r6854, May 07 2009, 13:07:14)
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
----------------------------------------------------------------------
>Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-25 12:13
Message:
Attached a fixed family file. Problem resolved, bug closed.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-25 06:59
Message:
Hello!
Your family file is wrong. Have you read
http://meta.wikimedia.org/wiki/Pywikipedia_bot_on_non-Wikimedia_projects ?
It might help +)
The addresses of index and api are http://bestbrute.wikia.com/index.php
and http://bestbrute.wikia.com/api.php which means that the scriptpath
should be '' :
def scriptpath(self, code):
return ''
With this script path set, you don't need to override path(), or apipath()
and things will work for you.
----------------------------------------------------------------------
Comment By: Ronga (ronga)
Date: 2009-05-25 05:59
Message:
This is where I run your robot scripts:
http://bestbrute.wikia.com/
BestBrute - MyBrute Wiki - custom family file
File has been attached. Please check.
It seems this problem always happen on me. It's not an occasional error.
This bug also affect quite a few commands, not just replace.py -start:
I remember I tried -titleregex in another py file. I saw the same error
message.
So does anyone know how to workaround it? (Perhaps using other commands).
I want to tell the robot to check all templates, but the -start command
doesn't work for me. What else could I use?
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-05-24 06:20
Message:
It also happens to me from time to time, on wikimedia project.
I'm not sure of what happens here, I'm not familiar enough with the api.
Checking for soup.api is not None , and retry if it's None could do the
trick, but once again, we're inserting magic tricks to use the api, when it
would be better to focus on porting our code base to the rewrite branch...
:/
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-24 01:35
Message:
You should attach your custom family file (families/bestbrute_family.py) so
I can reproduce this bug.
----------------------------------------------------------------------
Comment By: Ronga (ronga)
Date: 2009-05-23 22:39
Message:
===================================================
Update:
I got the latest version from http://toolserver.org/~valhallasw/pywiki/.
Extracted to the same folder. Selected "replace all"
Still the same error persists.
Reply @ Date: 2009-05-24 02:10
Sender: cosoleto
> please include, as well as the traceback, family, language
What traceback? Isn't the message included it already?
family = 'bestbrute'
mylang = 'en'
> last 10 lines before that error is raised
The following has shown all message.
The whole message:
C:\pywikipedia>replace.py -start:"Template:!" "File:Cross.svg" "File:Cross
red.s
vg"
Traceback (most recent call last):
File "C:\pywikipedia\pagegenerators.py", line 787, in __iter__
for page in self.wrapped_gen:
File "C:\pywikipedia\pagegenerators.py", line 719, in
DuplicateFilterPageGener
ator
for page in generator:
File "C:\pywikipedia\pagegenerators.py", line 250, in
AllpagesPageGenerator
for page in site.allpages(start = start, namespace = namespace,
includeredir
ects = includeredirects):
File "C:\pywikipedia\wikipedia.py", line 5512, in allpages
for p in soup.api.query.allpages:
AttributeError: 'NoneType' object has no attribute 'query'
'NoneType' object has no attribute 'query'
C:\pywikipedia>version.py
Pywikipedia nightly:pywikipedia (r6915, May 22 2009, 23:45:12)
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit
(Intel)]
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-23 20:10
Message:
Looks as a problem already reported but I don't remember whether it is
fixed or not. You should update your PyWikipediaBot version as it isn't up
to date (15 days old) and report again the problem here if persists. In
case, please include, as well as the traceback, family, language and last
10 lines before that error is raised.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2795879&group_…