dopefishh / pympi

A python module for processing ELAN and Praat annotation files
MIT License
93 stars 39 forks source link

to_textgrid fails for Eaf from sample file #31

Closed xrotwang closed 3 years ago

xrotwang commented 3 years ago

I noticed the last release of this package on pypi is from 2016. While it still installs (e.g. under py37), the test suite does not pass - and I noticed bugs (e.g. under py3.5), like

>>> e = pympi.Eaf('test/sample_2.7.eaf')
>>> tg = e.to_textgrid()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forkel/venvs/tpympi/lib/python3.5/site-packages/pympi/Elan.py", line 1328, in to_textgrid
    _, end = self.get_full_time_interval()
  File "/home/forkel/venvs/tpympi/lib/python3.5/site-packages/pympi/Elan.py", line 650, in get_full_time_interval
    (min(self.timeslots.values()), max(self.timeslots.values()))
TypeError: unorderable types: int() < NoneType()

So it doesn't look like it is fully supported under py3 - yet?

dopefishh commented 3 years ago

Python2 and python3 were both supported at the time but it may be the case that some backwards incompatible changes have been added to later versions of python3 that broke support for one or the other.

I would be glad to have things polished and make a new release. It may even be worthwhile stop supporting python2 since it becomes increasingly more difficult to write code that works both on python3 and python2 and python2 is EOL anyway.

xrotwang commented 3 years ago

I dropped py2 support for all of my packages a couple of months ago - and haven't heard complaints :) Let me know if you'd like help with any of that.

dopefishh commented 3 years ago

Thanks, feel free to pick up on any issue tagged with the Release 1.7 milestone. If they are fixed I propose to upload a new version of the package to pypi