File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,9 @@ Bug fixes
47
47
pandas when decoding times outside the range that can be represented with
48
48
nanosecond-precision values (:issue: `6716 `, :pull: `6717 `).
49
49
By `Spencer Clark <https://github.com/spencerkclark >`_.
50
+ - :py:meth: `open_dataset ` with dask and ``~ `` in the path now resolves the home directory
51
+ instead of raising an error. (:issue: `6707 `, :pull: `6710 `)
52
+ By `Michael Niklas <https://github.com/headtr1ck >`_.
50
53
51
54
Documentation
52
55
~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ def _get_mtime(filename_or_obj):
224
224
path = None
225
225
226
226
if path and not is_remote_uri (path ):
227
- mtime = os .path .getmtime (filename_or_obj )
227
+ mtime = os .path .getmtime (os . path . expanduser ( filename_or_obj ) )
228
228
229
229
return mtime
230
230
Original file line number Diff line number Diff line change @@ -412,7 +412,7 @@ def open_rasterio(
412
412
413
413
# augment the token with the file modification time
414
414
try :
415
- mtime = os .path .getmtime (filename )
415
+ mtime = os .path .getmtime (os . path . expanduser ( filename ) )
416
416
except OSError :
417
417
# the filename is probably an s3 bucket rather than a regular file
418
418
mtime = None
You can’t perform that action at this time.
0 commit comments