Skip to content

orgparse.load() is broken for file-like objects #32

@odahoda

Description

@odahoda

Hi,

The docstring says that the argument can be "str or file-like" and I've been using it with the latter. But that got broken by a recent venv update.

Looks like commit 3067189 is the culprit. It added a line

path = str(path) # in case of pathlib.Path

which means that it's now trying to open a file named <_io.TextIOWrapper name='tasks.org' mode='r' encoding='UTF-8'>, which obviously fails.

That line of code looks a bit out of place, or at least unrelated to the commit message. Was it intended to be commited?

-Ben

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