pastebinit crashed with ExpatError in parseString(): not well-formed (invalid token): line 4, column 23

Bug #975065 reported by Marcos K on 2012-04-06
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pastebinit (Ubuntu)
Medium
Stéphane Graber

Bug Description

 cat somfile.txt |pastebinit

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: pastebinit 1.2-2
ProcVersionSignature: Ubuntu 3.0.0-18.31-generic 3.0.26
Uname: Linux 3.0.0-18-generic i686
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Thu Apr 5 06:11:47 2012
ExecutablePath: /usr/bin/pastebinit
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/pastebinit
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 LANGUAGE=en_US:en
PythonArgs: ['/usr/bin/pastebinit']
SourcePackage: pastebinit
Title: pastebinit crashed with ExpatError in parseString(): not well-formed (invalid token): line 4, column 23
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout libvirtd lpadmin plugdev sambashare

Marcos K (g-ubuntu-com-y) wrote :
visibility: private → public
tags: removed: need-duplicate-check
Rolf Leggewie (r0lf) wrote :

first question: is this reproducible for you?

Changed in pastebinit (Ubuntu):
status: New → Incomplete
assignee: nobody → Rolf Leggewie (r0lf)
Marcos K (g-ubuntu-com-y) wrote :

Yes, it happens every day in my cron job.

Here's an excerpt from the script's log:

cat $bourse.statsTable.txt |pastebinit

Traceback (most recent call last):
  File "/usr/bin/pastebinit", line 217, in <module>
    configxml = xml.dom.minidom.parseString(configtext)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1924, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 4, column 23

Even pastebinit -l gives that instead of listing supported services.

$HOME/.pastebinit.xml :
------
        <pastebinit>
# <pa stebin>http://paste.ubuntu.com</pa stebin>
            <author>MeMeMe</author>
            <jabberid><email address hidden></jabberid>
            <format>text</format>
        </pastebinit>

# dmesg |pastebinit
#http://paste.ubuntu.com/911164/
------------

So I think the problem might lie with the comment lines in the config file, or deliberately broken/nonexistent XML tags.

Changed in pastebinit (Ubuntu):
importance: Undecided → Medium
Rolf Leggewie (r0lf) wrote :

my apologies for the late response. I don`t think I was informed about your update to this ticket by mail. My hunch is also that the hash in the xml config file is what is creating problems. Would you please be so kind to verify?

Marcos K (g-ubuntu-com-y) wrote :

Verify the problem:

master@quant~/dev Sun Nov 18,19:01:30$ (1762) pastebinit -l
Traceback (most recent call last):
  File "/usr/bin/pastebinit", line 217, in <module>
    configxml = xml.dom.minidom.parseString(configtext)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1924, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 4, column 23

master@quant~/dev Sun Nov 18,19:01:41$ (1762) dmesg |pastebinit
Traceback (most recent call last):
  File "/usr/bin/pastebinit", line 217, in <module>
    configxml = xml.dom.minidom.parseString(configtext)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1924, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 5, column 23

Rolf Leggewie (r0lf) wrote :

the ticket looks invalid to me, then, but I will let the main developer decide.

Changed in pastebinit (Ubuntu):
assignee: Rolf Leggewie (r0lf) → Stéphane Graber (stgraber)
Stéphane Graber (stgraber) wrote :

Indeed, # isn't a valid way of making a comment in xml syntax.

Use <!-- comment --> instead.

Changed in pastebinit (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers