Skip to content

Bug with building offset_dict #375

@michaelmarty

Description

@michaelmarty

Describe the bug

With a particular mzML file that someone shared with me, the offset_dict is not built correctly the first time. When I run:

msrun = pymzml.run.Reader(test)
msrun[0]

it gives "KeyError: 0". But, if I run:

msrun = pymzml.run.Reader(test)
msrun[1]
msrun[0]

all is good. It seems to only happen when calling msrun[0]. Other data that is not zero indexed is fine. The file was converted from MGF and is uploaded here.

exportMGF_10spectra.zip

Any idea how to fix this?

To Reproduce
See above.

Desktop (please complete the following information):

  • OS: Windows
  • Version: 2.5.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions