Skip to content

Commit 1439fec

Browse files
Use f.name for 3.8 rdata call
1 parent 0c503aa commit 1439fec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pins/drivers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ def load_data(
130130
# See https://github.com/rstudio/pins-python/pull/265
131131
if isinstance(f, fsspec.implementations.local.LocalFileOpener):
132132
# rdata requires f to be a BinaryIO object.
133-
io_f = f.f
133+
fp = f.name
134134
else:
135-
io_f = f
136-
parsed = rdata.parser.parse_file(io_f)
135+
fp = f
136+
parsed = rdata.parser.parse_file(fp)
137137
return rdata.conversion.convert(parsed)
138138
except ModuleNotFoundError:
139139
raise ModuleNotFoundError(

0 commit comments

Comments
 (0)