[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] grc should warn, not fail with malformed xml

From: Dimitris Symeonidis
Subject: [Discuss-gnuradio] grc should warn, not fail with malformed xml
Date: Fri, 3 Apr 2009 11:43:43 +0200

I am creating xml files for my RDS block, in order to be able to use
it together with GRC.
I had forgotten to close a tag in an xml file that I had put into
The result was that I couldn't run GRC anymore, it would exit with
these messages on the console:

Traceback (most recent call last):
  File "/usr/local/bin/grc", line 45, in <module>
    ActionHandler(args, Platform())
line 61, in __init__
line 63, in __init__
    self._load_blocks(os.path.join(dirpath, filename))
line 74, in _load_blocks
    try: ParseXML.validate_dtd(f, self._block_dtd)
  File "/usr/local/lib/python2.6/dist-packages/gnuradio/grc/utils/ParseXML.py",
line 38, in validate_dtd
    xml = etree.parse(xml_file, parser=parser)
  File "lxml.etree.pyx", line 2583, in lxml.etree.parse
  File "parser.pxi", line 1465, in lxml.etree._parseDocument
  File "parser.pxi", line 1494, in lxml.etree._parseDocumentFromURL
  File "parser.pxi", line 1394, in lxml.etree._parseDocFromFile
  File "parser.pxi", line 968, in
lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:60309)
  File "parser.pxi", line 542, in
  File "parser.pxi", line 628, in lxml.etree._handleParseResult
  File "parser.pxi", line 568, in lxml.etree._raiseParseError
lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: doc line
23 and block, line 29, column 9

Josh, shouldn't GRC ignore malformed xml files (or maybe warn),
instead of failing to run?
Sorry, I am not yet familiar enough to submit a patch for this...

Dimitris Symeonidis
"If you think you're too small to make a difference, try sleeping with
a mosquito!" - Amnesty International

reply via email to

[Prev in Thread] Current Thread [Next in Thread]