crashes with ValueError on gnome-cpu-frequency-applet.svg

Bug #676905 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scour
Invalid
Undecided
Unassigned

Bug Description

When I run scour on that SVG, I get a crash:

scour 0.25
Copyright Jeff Schiller, Louis Simard, 2010
Traceback (most recent call last):
  File "/usr/bin/scour", line 2933, in <module>
    out_string = scourString(in_string, options).encode("UTF-8")
  File "/usr/bin/scour", line 2588, in scourString
    doc = xml.dom.minidom.parseString(in_string)
  File "/usr/lib/python2.6/xml/dom/minidom.py", line 1928, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
  File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 354, in first_element_handler
    self.start_element_handler(name, attributes)
  File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 779, in start_element_handler
    uri, localname, prefix, qname = _parse_ns_name(self, aname)
  File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 127, in _parse_ns_name
    uri, localname = parts
ValueError: too many values to unpack

The SVG is shipped in the gnome-applets-data package, but I attach it here for reference.

Thanks!

Revision history for this message
Martin Pitt (pitti) wrote :
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :

This is an exception that's being thrown by the xml.dom Python package, and it has to do with the input file having a space in an URL-typed attribute:

 3: <svg
 4: xmlns:s="http://inkscape.sourceforge.net/DTD/s odipodi-0.dtd"

URLs can't have spaces, per RFC 3986 <http://www.rfc-editor.org/rfc/rfc3986.txt>

As a workaround for your problem with the file, you may run this command and retry Scour:

 sed -i 's/s odipodi-0/sodipodi-0/g' /path/to/gnome-cpu-frequency-applet.svg

Changed in scour:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.