[Pywikipedia-l] XMLreader.py

emijrp emijrp at gmail.com
Wed Oct 6 18:12:22 UTC 2010


I get this:

>>> dump = xmlreader.XmlDump("kwwiki-20100926-pages-meta-history.xml.bz2")
>>> parser=dump.parse()
Reading XML dump...
>>> print parser
<generator object new_parse at 0xb7782b94>
>>>

Very weird.

2010/10/6 Russell Blau <russblau at hotmail.com>

> "emijrp" <emijrp at gmail.com> wrote in message
> news:AANLkTi=A-=HYv03T+xyhvFurJqCYA-bCjfMhx6N13pGD at mail.gmail.com...
>
> > I have tested your code, with the bz2 and 7z dumps, and I get titles
> > with None value. The first one is the same error that apperas in my code.
> >
> > Reading XML dump...
> > None 2004-10-10T04:24:14Z
> >
> > I have the last version of pywikipediabot and Python 2.6.5 (r265:79063,
> > Apr 16 2010, 13:09:56). Probably, it can be a error of Python or
> > cElementTree.
> > What are your versions?
>
> Pywikipedia [svn+ssh] (r8609, 2010/10/05, 16:21:42)
> Python 2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)]
>
> However, I retried the same tests under Python 2.6.5 and got the same
> results.
>
> Try the following and see if your result is different than mine:
>
> >>> import xmlreader
> >>> dump = xmlreader.XmlDump("kwwiki-20100926-pages-meta-history.xml.bz2")
> >>> parser = dump.parse()
> Reading XML dump...
> >>> print parser
> <generator object new_parse at 0x0132A968>
>
> If you get <generator object regex_parse ...> instead of new_parse, then
> you
> don't have elementtree available, although since it is supposed to be
> standard since Python 2.5 that would be somewhat surprising.
>
> Russ
>
>
>
>
> _______________________________________________
> Pywikipedia-l mailing list
> Pywikipedia-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wikimedia.org/pipermail/pywikipedia-l/attachments/20101006/5a03d51b/attachment.htm 


More information about the Pywikipedia-l mailing list