Bugs item #3496817, was opened at 2012-03-04 10:05
Message generated for change (Tracker Item Submitted) made by
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=349681…
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: Paolo Benvenuto ()
Assigned to: Nobody/Anonymous (nobody)
Summary: replace.py error reading xml file
Initial Comment:
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r9969, 2012/03/04, 15:55:41)
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5]
config-settings:
use_api = True
use_api_login = True
unicode test: triggers problem #3081100
It seems that replace.py cannot read my xml file:
$ python replace.py -ns:0 -dotall -xml:cathopedia.it.xml "1"
"\1"unicode test: triggers problem #3081100
Reading XML dump...
Traceback (most recent call last):
File "/var/wwwc/cathopedia.org/pywikipedia/pagegenerators.py", line 1182, in
__iter__
for page in self.wrapped_gen:
File "/var/wwwc/cathopedia.org/pywikipedia/pagegenerators.py", line 1039, in
NamespaceFilterPageGenerator
for page in generator:
File "/var/wwwc/cathopedia.org/pywikipedia/pagegenerators.py", line 1084, in
DuplicateFilterPageGenerator
for page in generator:
File "replace.py", line 224, in __iter__
for entry in self.parser:
File "/var/wwwc/cathopedia.org/pywikipedia/xmlreader.py", line 320, in
new_parse
for rev in self._parse(event, elem):
File "/var/wwwc/cathopedia.org/pywikipedia/xmlreader.py", line 325, in
_parse_only_latest
if event == "end" and elem.tag == "{%s}page" % self.uri:
AttributeError: 'XmlDump' object has no attribute 'uri'
'XmlDump' object has no attribute 'uri'
0 pages were changed.
My xml file where generated with the command
mysqldump --xml -ubackup -p***** --databases db > cathopedia.it.xml
The version is
$ mysqldump --version
mysqldump Ver 10.13 Distrib 5.1.49, for debian-linux-gnu (x86_64)
I'm wondering if I'm missing som mysqldump option, but I don't think so.
Actually, another script (add_text.py) reads the xml file without any problem, and I could
use it many times
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=349681…