id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 600268506,MDU6SXNzdWU2MDAyNjg1MDY=,3974,load_dataset fails when filename is unicode,12728107,closed,0,,,4,2020-04-15T12:42:49Z,2022-05-06T08:13:04Z,2022-05-06T08:13:04Z,NONE,,,,"It seems like xarray does not handle unicode file names. The error is present even if the unicode characters appear in the parent path. #### MCVE Code Sample ```python import xarray as xr import os xr.Dataset().to_netcdf('caesar.nc') os.rename('caesar.nc', 'cæsar.nc') try: xr.load_dataset('cæsar.nc') print('Success') except FileNotFoundError: print('File not found') ``` #### Expected Output 'Success' #### Actual Output 'File not found' #### Problem Description xarray does not recognize file names with unicode letters #### Versions
Output of `xr.show_versions()` INSTALLED VERSIONS ------------------ commit: None python: 3.7.7 (default, Mar 23 2020, 23:19:08) [MSC v.1916 64 bit (AMD64)] python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 158 Stepping 9, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: None.None libhdf5: 1.10.4 libnetcdf: 4.6.1 xarray: 0.15.1 pandas: 1.0.3 numpy: 1.18.1 scipy: 1.4.1 netCDF4: 1.4.2 pydap: None h5netcdf: None h5py: 2.10.0 Nio: None zarr: None cftime: 1.1.1.1 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2.14.0 distributed: 2.14.0 matplotlib: 3.1.0 cartopy: 0.17.0 seaborn: None numbagg: None setuptools: 46.1.3.post20200330 pip: 20.0.2 conda: 4.8.3 pytest: 5.4.1 IPython: 7.13.0 sphinx: None
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3974/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue