html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/5881#issuecomment-949050951,https://api.github.com/repos/pydata/xarray/issues/5881,949050951,IC_kwDOAMm_X844kV5H,35968931,2021-10-21T22:31:43Z,2021-10-21T22:31:43Z,MEMBER,"In fact in light of https://github.com/pydata/xarray/pull/5879, it should probably be ```python + elif isinstance(paths, os.PathLike): + paths = [str(paths)] ``` instead.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1032233673 https://github.com/pydata/xarray/issues/5881#issuecomment-949049437,https://api.github.com/repos/pydata/xarray/issues/5881,949049437,IC_kwDOAMm_X844kVhd,35968931,2021-10-21T22:28:17Z,2021-10-21T22:28:17Z,MEMBER,"Hi @pmav99, thanks for raising this! I would probably just fix it with ```python diff --git a/xarray/backends/api.py b/xarray/backends/api.py index 6d73946b..00619d68 100644 --- a/xarray/backends/api.py +++ b/xarray/backends/api.py @@ -865,6 +865,8 @@ def open_mfdataset( ) else: paths = sorted(glob(_normalize_path(paths))) + elif isinstance(paths, Path): + paths = [str(paths)] else: paths = [str(p) if isinstance(p, Path) else p for p in paths] ``` to emulate the list comprehension we already have. Would you be interested in submitting this little fix as a PR? Or would you rather I did it?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1032233673