Bugs item #2577598, was opened at 2009-02-07 16:49 Message generated for change (Comment added) made by xqt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2577598...
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: Out of Date
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: xqt (xqt)
Date: 2009-11-16 12:01
Message: old code stuff
----------------------------------------------------------------------
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...
pywikipedia-bugs@lists.wikimedia.org