Skip to content

BinaryZlibFile: self._fp may not have seekable() function in python 2.7 #398

@csfoo

Description

@csfoo

The file object created by open() does not support the seekable() function in python 2.7 (but it does in python 3), which will lead to an AttributeError: 'file' object has no attribute 'seekable' error on the following calls:

https://github.com/joblib/joblib/blob/master/joblib/numpy_pickle_utils.py#L351
https://github.com/joblib/joblib/blob/master/joblib/numpy_pickle_utils.py#L389

A possible solution would be to replace open with io.open, but that wouldn't help if the user passed in a file object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions