Skip to content

Error when writing modified GFF file #9

@hdbeukel

Description

@hdbeukel

I am trying to parse a GFF file, modify it by removing overlapping features, and write the new GFF to a file. I get the following error when trying to write the GFF:

TypeError: a bytes-like object is required, not 'str'

I even get this same error when just parsing a GFF file and writing it to another file, without any modifications in between:

gff = Gff3()
gff.parse("path/to/my.gff3")
gff.write("path/to/output.gff3")

When looking in the source code, I noticed that you are reading the GFF file with mode "r" but writing with mode "wb". Could this be the reason why I get this error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions