Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mzML2isa fails on MTBLS 433 (cannot find softwareRef) #30

Open
althonos opened this issue Jun 15, 2017 · 0 comments
Open

mzML2isa fails on MTBLS 433 (cannot find softwareRef) #30

althonos opened this issue Jun 15, 2017 · 0 comments
Labels

Comments

@althonos
Copy link
Member

Tried to parse a single file KA1_GB1_01_10465.mzML, got the following traceback:

raceback (most recent call last):
  File "/home/althonos/Code/mzml2isa/mzml2isa/mzml.py", line 267, in cvParam_loop
    soft_ref = get_parent(e, self.tree).attrib['softwareRef']
  File "src/lxml/lxml.etree.pyx", line 2467, in lxml.etree._Attrib.__getitem__ (src/lxml/lxml.etree.c:70679)
KeyError: 'softwareRef'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/althonos/Code/mzml2isa/mzml2isa/__main__.py", line 5, in <module>
    parsing.main()
  File "/home/althonos/Code/mzml2isa/mzml2isa/parsing.py", line 224, in main
    jobs=args.jobs, template_directory=args.template_dir, OUT_dir=args.OUT_path
  File "/home/althonos/Code/mzml2isa/mzml2isa/parsing.py", line 158, in convert
    metalist = [_parse_file([mzml_file, ontology, parser, pbar]) for mzml_file in sorted(mzml_files, key=str)]
  File "/home/althonos/Code/mzml2isa/mzml2isa/parsing.py", line 158, in <listcomp>
    metalist = [_parse_file([mzml_file, ontology, parser, pbar]) for mzml_file in sorted(mzml_files, key=str)]
  File "/home/althonos/Code/mzml2isa/mzml2isa/utils.py", line 245, in new_func
    return func(*args[0])
  File "/home/althonos/Code/mzml2isa/mzml2isa/parsing.py", line 77, in _parse_file
    meta = parser(filepath, ontology).meta
  File "/home/althonos/Code/mzml2isa/mzml2isa/mzml.py", line 146, in __init__
    self.extract_meta(terms, xpaths_meta)
  File "/home/althonos/Code/mzml2isa/mzml2isa/mzml.py", line 195, in extract_meta
    self.cvParam_loop(elements, location_name, terms)
  File "/home/althonos/Code/mzml2isa/mzml2isa/mzml.py", line 269, in cvParam_loop
    soft_ref = get_parent(get_parent(e, self.tree), self.tree).attrib['softwareRef']
  File "src/lxml/lxml.etree.pyx", line 2467, in lxml.etree._Attrib.__getitem__ (src/lxml/lxml.etree.c:70679)
KeyError: 'softwareRef'

It seems the file was converted from mzXML before hand as suggested from the sourceFile tag.

@althonos althonos added the bug label Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant