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

python error when using airr.read_rearrangement with gzip file #787

Closed
schristley opened this issue May 10, 2024 · 1 comment · Fixed by #808
Closed

python error when using airr.read_rearrangement with gzip file #787

schristley opened this issue May 10, 2024 · 1 comment · Fixed by #808
Assignees
Labels
Python library Python reference library for AIRR standards
Milestone

Comments

@schristley
Copy link
Member

When using airr.read_rearrangement on a gzip file, get this error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/dist-packages/airr/io.py", line 89, in __next__
    row = next(self.dict_reader)
  File "/usr/lib/python3.8/csv.py", line 110, in __next__
    self.fieldnames
  File "/usr/lib/python3.8/csv.py", line 97, in fieldnames
    self._fieldnames = next(self.reader)
_csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)

it seems we don't have a python test for this.

@schristley
Copy link
Member Author

open with 'rt' seems to work.

@javh javh added this to the AIRR 2.0 milestone Sep 9, 2024
@javh javh self-assigned this Sep 9, 2024
@javh javh added the Python library Python reference library for AIRR standards label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python library Python reference library for AIRR standards
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants