Skip to content

Commit

Permalink
fix bug in open_dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaze committed Oct 25, 2024
1 parent 1b2ca31 commit dca8524
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions argopy/stores/filesystems.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ def open_dataset(
--------
:func:`httpstore.open_mfdataset`
"""
def load_in_memory(url, errors, dwn_opts, xr_opts):
def load_in_memory(url, errors='raise', dwn_opts={}, xr_opts={}):
data = self.download_url(url, **dwn_opts)
if data is None:
if errors == "raise":
Expand All @@ -848,7 +848,7 @@ def load_in_memory(url, errors, dwn_opts, xr_opts):

return data, xr_opts

def load_lazily(url, errors, dwn_opts, xr_opts):
def load_lazily(url, errors='raise', dwn_opts={}, xr_opts={}):
from . import ArgoKerchunker

if "ak" not in kwargs:
Expand Down Expand Up @@ -877,7 +877,7 @@ def load_lazily(url, errors, dwn_opts, xr_opts):
return load_in_memory(url, errors=errors, dwn_opts=dwn_opts, xr_opts=xr_opts)

if not lazy:
target = load_in_memory(url, errors=errors, dwn_opts=dwn_opts, xr_opts=xr_opts)
target, _ = load_in_memory(url, errors=errors, dwn_opts=dwn_opts, xr_opts=xr_opts)
else:
target, xr_opts = load_lazily(url, errors=errors, dwn_opts=dwn_opts, xr_opts=xr_opts)

Expand Down

0 comments on commit dca8524

Please sign in to comment.