Skip to content

snakemake.io._IOFile.open method doesn't use it's keyword arguments #2846

@J-Wall

Description

@J-Wall

Snakemake version
Checked this issue is in the master branch

Describe the bug

I am trying to open a file (output of a checkpoint rule) using the .open() method while specifying the mode. However, it just gets opened in text mode which leads to an error downstream in my code.

I had a look at the code in the master branch, and the method has call signature

def open(self, mode="r", buffering=-1, encoding=None, errors=None, newline=None):

however, in the body of the function it just calls

f = open(self)

I think this should instead be

f = open(self, mode=mode, buffering=buffering, encoding=encoding, errors=errors, newline=newline)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions