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

Fixing encoding errors on windows #56

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

quadrismegistus
Copy link

@quadrismegistus quadrismegistus commented Aug 4, 2024

PR to address #55.

This mainly adds the encoding='utf-8' where appropriate so files open safely on Windows.

I also ran into a recursion error on test_featuretable.py. The issue appears to be a recursion problem in the SegmentSorter class. The segments property is calling sort_segments(), which in turn is accessing segments, creating an infinite loop. There, the changes made in featuretable.py are:

  • Renamed sort_segments() to _sort_segments() to indicate it's a private method.
  • In the segments property, we now call self._sort_segments() instead of self.sort_segments().
  • In _sort_segments(), we set self._sorted = True after sorting.

All tests pass locally for me, on Mac and Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant