Bugs item #2035835, was opened at 2008-08-02 12:02 Message generated for change (Comment added) made by darkoneko You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2035835...
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: Open Resolution: None Priority: 5 Private: No Submitted By: Purodha B Blissenbach (purodha) Assigned to: Nobody/Anonymous (nobody) Summary: SaxParseBug caused error invalid literal for int()
Initial Comment: I got an error message an trace dump from interwiki.py which afterwords continues gracefully. Here are the messages:
python /home/purodha/pywikipedia/interwiki.py -v -initialredirect -new:3 Checked for running processes. 1 processes currently running, including the current process. Pywikipediabot (r5776 (wikipedia.py), Aug 01 2008, 15:39:04) Python 2.5.2 (r252:60911, May 28 2008, 19:19:25) [GCC 4.2.4 (Debian 4.2.4-1)] Retrieving mediawiki messages from Special:Allmessages WARNING: No character set found. NOTE: Number of pages queued is 0, trying to add 60 more. Getting 3 pages from wikipedia:ksh...
-- some lines skipped --
Getting 1 pages from wikipedia:am... ERROR: SaxParseBug caused error invalid literal for int() with base 10: 'NS_CATEGORY'. Dump SaxParseBug_wikipedia_am__Sat_Aug__2_09-54-57_2008.dump created. Traceback (most recent call last): File "/home/purodha/pywikipedia/pagegenerators.py", line 768, in __iter__ for loaded_page in self.preload(somePages): File "/home/purodha/pywikipedia/pagegenerators.py", line 785, in preload wikipedia.getall(site, pagesThisSite) File "/home/purodha/pywikipedia/wikipedia.py", line 2950, in getall _GetAll(site, pages, throttle, force).run() File "/home/purodha/pywikipedia/wikipedia.py", line 2798, in run xml.sax.parseString(data, handler) File "/usr/lib/python2.5/site-packages/_xmlplus/sax/__init__.py", line 47, in parseString parser.parse(inpsrc) File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib/python2.5/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 216, in feed self._parser.Parse(data, isFinal) File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 312, in start_element self._cont_handler.startElement(name, AttributesImpl(attrs)) File "/home/purodha/pywikipedia/xmlreader.py", line 150, in startElement self.namespaceid = int(attrs['key']) ValueError: invalid literal for int() with base 10: 'NS_CATEGORY' invalid literal for int() with base 10: 'NS_CATEGORY' Getting page [[am:????]]
etc.
----------------------------------------------------------------------
Comment By: DarkoNeko (darkoneko) Date: 2008-08-02 13:14
Message: Logged In: YES user_id=1809111 Originator: NO
Same for me ----version---- Pywikipedia [http] trunk/pywikipedia (r5781, Aug 01 2008, 21:44:26) Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]
----trace---- Updating links on page [[scn:1054]]. No changes needed Updating links on page [[be:1054]]. No changes needed Getting 60 pages from wikipedia:oc... Getting 60 pages from wikipedia:mk... Checked for running processes. 1 processes currently running, including the curr ent process. Getting 60 pages from wikipedia:sw... Getting 60 pages from wikipedia:pi... Getting 60 pages from wikipedia:sa... Getting 60 pages from wikipedia:am... ERROR: SaxParseBug caused error invalid literal for int() with base 10: 'NS_CATE GORY'. Dump SaxParseBug_wikipedia_am__Sat_Aug_02_13-07-31_2008.dump created. Traceback (most recent call last): File "C:\Program Files\TortoiseSVN\pywikipedia\pagegenerators.py", line 762, i n __iter__ for loaded_page in self.preload(somePages): File "C:\Program Files\TortoiseSVN\pywikipedia\pagegenerators.py", line 785, i n preload wikipedia.getall(site, pagesThisSite) File "C:\Program Files\TortoiseSVN\pywikipedia\wikipedia.py", line 2950, in ge tall _GetAll(site, pages, throttle, force).run() File "C:\Program Files\TortoiseSVN\pywikipedia\wikipedia.py", line 2798, in ru n xml.sax.parseString(data, handler) File "c:\Program Files\Python25\lib\xml\sax__init__.py", line 49, in parseStr ing parser.parse(inpsrc) File "c:\Program Files\Python25\lib\xml\sax\expatreader.py", line 107, in pars e xmlreader.IncrementalParser.parse(self, source) File "c:\Program Files\Python25\lib\xml\sax\xmlreader.py", line 123, in parse self.feed(buffer) File "c:\Program Files\Python25\lib\xml\sax\expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal) File "c:\Program Files\Python25\lib\xml\sax\expatreader.py", line 301, in star t_element self._cont_handler.startElement(name, AttributesImpl(attrs)) File "C:\Program Files\TortoiseSVN\pywikipedia\xmlreader.py", line 150, in sta rtElement self.namespaceid = int(attrs['key']) ValueError: invalid literal for int() with base 10: 'NS_CATEGORY' invalid literal for int() with base 10: 'NS_CATEGORY'
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2035835...