Last modified: 2014-07-25 07:22:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57209, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55209 - replace.py error reading xml file
replace.py error reading xml file
Status: NEW
Product: Pywikibot
Classification: Unclassified
xmlreader.py (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-05 04:44 UTC by Kunal Mehta (Legoktm)
Modified: 2014-07-25 07:22 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:44:02 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1417/
Reported by: paolobenve
Created on: 2012-03-04 18:05:03
Subject: replace.py error reading xml file
Original description:
$ 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
Comment 1 Kunal Mehta (Legoktm) 2013-10-05 04:44:04 UTC
Could you upload the dump file to investigate on this bug or is it secret?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links