Skip to content

igwn_ligolw_no_ilwdchar produces errors when run on old-format files

The igwn_ligolw_no_ilwdchar tool's purpose is to convert old-format ligolw files to new-format ligolw files: "Convert ilwd:char columns to int_8s. Also ensure table name prefixes are removed from columns that shouldn't have them, according to the specifications in lsctables." (from --help) Running version 2.1.0 from the igwn Conda env (igwn-py310-20250529) on an old-format DQXML file (L-DQ_Segments-1283100000-16.xml) (segment file from the DMT) produces an error:

Traceback (most recent call last):
  File "/cvmfs/software.igwn.org/conda/envs/igwn-py310-20250529/lib/python3.10/site-packages/igwn_ligolw/ligolw.py", line 2922, in startElementNS
    self.current = self.current.appendChild(start_handler(self.current, attrs))
  File "/cvmfs/software.igwn.org/conda/envs/igwn-py310-20250529/lib/python3.10/site-packages/igwn_ligolw/ligolw.py", line 280, in appendChild
    self._verifyChildren(len(self.childNodes) - 1)
  File "/cvmfs/software.igwn.org/conda/envs/igwn-py310-20250529/lib/python3.10/site-packages/igwn_ligolw/ligolw.py", line 1489, in _verifyChildren
    raise ElementError(
igwn_ligolw.ligolw.ElementError: invalid type 'ilwd:char' for Column 'process_id' in Table 'process', expected type 'int_8s'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/cvmfs/software.igwn.org/conda/envs/igwn/bin/igwn_ligolw_no_ilwdchar", line 75, in <module>
    xmldoc = ligolw_utils.load_filename(filename, verbose=options.verbose)
  File "/cvmfs/software.igwn.org/conda/envs/igwn-py310-20250529/lib/python3.10/site-packages/igwn_ligolw/utils/__init__.py", line 553, in load_filename
    return load_fileobj(fileobj, **kwargs)
  File "/cvmfs/software.igwn.org/conda/envs/igwn-py310-20250529/lib/python3.10/site-packages/igwn_ligolw/utils/__init__.py", line 529, in load_fileobj
    ligolw.make_parser(contenthandler(xmldoc)).parse(fileobj)
  File "/cvmfs/software.igwn.org/conda/envs/igwn-py310-20250529/lib/python3.10/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/cvmfs/software.igwn.org/conda/envs/igwn-py310-20250529/lib/python3.10/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/cvmfs/software.igwn.org/conda/envs/igwn-py310-20250529/lib/python3.10/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "/home/conda/feedstock_root/build_artifacts/python-split_1744322439874/work/Modules/pyexpat.c", line 423, in StartElement
  File "/cvmfs/software.igwn.org/conda/envs/igwn-py310-20250529/lib/python3.10/xml/sax/expatreader.py", line 383, in start_element_ns
    self._cont_handler.startElementNS(pair, None,
  File "/cvmfs/software.igwn.org/conda/envs/igwn-py310-20250529/lib/python3.10/site-packages/igwn_ligolw/ligolw.py", line 2924, in startElementNS
    raise type(e)("line %d: %s" % (self._locator.getLineNumber(), str(e)))
igwn_ligolw.ligolw.ElementError: line 15: invalid type 'ilwd:char' for Column 'process_id' in Table 'process', expected type 'int_8s'

Running the old tool, ligolw_no_ilwdchar, version 1.8.3, from the same Conda env, successfully converts the file.

Here are some files on the CIT cluster that can be copied and used for testing (since conversion is done in-place; please don't convert the original files), if it's helpful:

  • /home/robert.bruntz/H-DQ_Segments_current.xml
    • DQSegDB publisher state file
  • /home/detchar/dqsegdb/H1L1V1-S6_CBC_HIGHMASS_D_OFFLINE-961545543-0.xml
    • veto definer file
  • /home/detchar/dqsegdb/L-DQ_Segments-1283100000-16.xml
    • DQXML file
  • /home/detchar/dqsegdb/ligolw_query_H1_DMT_ANALYSIS_READY_1_1248000000-1249000000.xml
    • DQSegDB query results file, old format file
  • /home/detchar/dqsegdb/ligolw_query_H1_DMT_ANALYSIS_READY_1_1248000000-1249000000.xml_new_format.xml
    • DQSegDB query results file, old format file converted to new format