bxlab / bx-python

Tools for manipulating biological data, particularly multiple sequence alignments
MIT License
145 stars 53 forks source link

StopIteration transformed to RuntimeError on python >= 3.7 #56

Closed mvdbeek closed 4 years ago

mvdbeek commented 4 years ago

This is due to https://www.python.org/dev/peps/pep-0479/

Traceback (most recent call last):
  File "/Users/mvandenb/miniconda3/envs/__bx-python@0.8.6/lib/python3.7/site-packages/bx/intervals/io.py", line 234, in iterwrapper
    self.current_line = next(self.input_wrapper)
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/datatypes/converters/interval_to_bedstrict_converter.py", line 155, in <module>
    __main__()
  File "/Users/mvandenb/src/galaxy/lib/galaxy/datatypes/converters/interval_to_bedstrict_converter.py", line 132, in __main__
    for count, region in enumerate(bx.intervals.io.NiceReaderWrapper(fh, chrom_col=chromCol, start_col=startCol, end_col=endCol, strand_col=strandCol, fix_strand=True, return_header=False, return_comments=False)):
  File "/Users/mvandenb/miniconda3/envs/__bx-python@0.8.6/lib/python3.7/site-packages/bx/intervals/io.py", line 221, in __next__
    nextitem = super(NiceReaderWrapper, self).__next__()
  File "/Users/mvandenb/miniconda3/envs/__bx-python@0.8.6/lib/python3.7/site-packages/bx/tabular/io.py", line 105, in __next__
    line = next(self.input_iter)
RuntimeError: generator raised StopIteration