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 1709215291,I_kwDOAMm_X85l4I47,7841,Xarray docs showing tracebacks instead of plots,22258697,closed,0,,,2,2023-05-15T02:40:36Z,2023-06-16T14:14:01Z,2023-06-16T14:14:01Z,NONE,,,,"### What happened? I think the docs on open_rasterio should be showing plots but show tracebacks instead: https://docs.xarray.dev/en/stable/examples/visualization_gallery.html#imshow()-and-rasterio-map-projections ### What did you expect to happen? should show plots ### Minimal Complete Verifiable Example ```Python https://docs.xarray.dev/en/stable/examples/visualization_gallery.html#imshow()-and-rasterio-map-projections ``` ### MVCE confirmation - [X] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray. - [X] Complete example — the example is self-contained, including all data and the text of any traceback. - [X] Verifiable example — the example copy & pastes into an IPython prompt or [Binder notebook](https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/blank_template.ipynb), returning the result. - [X] New issue — a search of GitHub Issues suggests this is not a duplicate. ### Relevant log output _No response_ ### Anything else we need to know? _No response_ ### Environment n/a","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7841/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 834368403,MDU6SXNzdWU4MzQzNjg0MDM=,5049,xarray.DataArray > None kills kernel,22258697,closed,0,,,8,2021-03-18T04:03:35Z,2021-03-25T06:54:36Z,2021-03-25T06:54:36Z,NONE,,,,"**What happened**: ```python import xarray as xr xr.open_rasterio(""test.tif"") > None ``` then the kernel dies. This doesn't happen when I create a DataArray from scratch from a python list or numpy array and try the same condition. Instead I get an appropriate error : ```python import xarray as xr import numpy as np xr.DataArray(np.array([1,2,3, np.nan])) > None ``` ```python --------------------------------------------------------------------------- TypeError Traceback (most recent call last) in 1 import xarray as xr 2 import numpy as np ----> 3 xr.DataArray(np.array([1,2,3, np.nan])) > None ~/miniconda3/envs/pybayts/lib/python3.7/site-packages/xarray/core/dataarray.py in func(self, other) 2990 variable = ( 2991 f(self.variable, other_variable) -> 2992 if not reflexive 2993 else f(other_variable, self.variable) 2994 ) ~/miniconda3/envs/pybayts/lib/python3.7/site-packages/xarray/core/variable.py in func(self, other) 2300 new_data = ( 2301 f(self_data, other_data) -> 2302 if not reflexive 2303 else f(other_data, self_data) 2304 ) TypeError: '>' not supported between instances of 'float' and 'NoneType' ``` **What you expected to happen**: An error. **Minimal Complete Verifiable Example**: ```python import xarray as xr xr.open_rasterio(""test.tif"") > None ``` **Anything else we need to know?**: **Environment**:
Output of xr.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 3.7.10 | packaged by conda-forge | (default, Feb 19 2021, 16:07:37) [GCC 9.3.0] python-bits: 64 OS: Linux OS-release: 5.4.0-66-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: None libnetcdf: None xarray: 0.17.0 pandas: 1.2.3 numpy: 1.20.1 scipy: 1.6.0 netCDF4: None pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: 1.2.1 cfgrib: None iris: None bottleneck: None dask: None distributed: None matplotlib: 3.3.4 cartopy: None seaborn: 0.11.1 numbagg: None pint: None setuptools: 49.6.0.post20210108 pip: 21.0.1 conda: None pytest: None IPython: 7.21.0 sphinx: None [test.zip](https://github.com/pydata/xarray/files/6161220/test.zip)
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5049/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 467735754,MDU6SXNzdWU0Njc3MzU3NTQ=,3108,Landsat Surface Reflectance bands have tricky metadata 'band' attribute,22258697,closed,0,,,3,2019-07-13T15:48:23Z,2019-07-16T15:47:26Z,2019-07-16T15:47:26Z,NONE,,,,"#### Code Sample, a copy-pastable example if possible ``` In [31]: band3 = xarray.open_rasterio(""LT050320312005040601T1-SC20190418222326/LT05_L1TP_032031_20050 ...: 406_20160912_01_T1_sr_band3.tif"") In [32]: band3 Out[32]: [55067661 values with dtype=int16] Coordinates: * band (band) int64 1 * y (y) float64 4.732e+06 4.732e+06 4.732e+06 ... 4.521e+06 4.521e+06 * x (x) float64 6.129e+05 6.129e+05 6.13e+05 ... 8.475e+05 8.475e+05 Attributes: transform: (30.0, 0.0, 612885.0, 0.0, -30.0, 4732515.0) crs: +init=epsg:32613 res: (30.0, 30.0) is_tiled: 0 nodatavals: (-9999.0,) scales: (1.0,) offsets: (0.0,) descriptions: ('band 3 surface reflectance',) In [33]: band3.band Out[33]: array([1]) Coordinates: * band (band) int64 1 In [35]: band4 Out[35]: [55067661 values with dtype=int16] Coordinates: * band (band) int64 1 * y (y) float64 4.732e+06 4.732e+06 4.732e+06 ... 4.521e+06 4.521e+06 * x (x) float64 6.129e+05 6.129e+05 6.13e+05 ... 8.475e+05 8.475e+05 Attributes: transform: (30.0, 0.0, 612885.0, 0.0, -30.0, 4732515.0) crs: +init=epsg:32613 res: (30.0, 30.0) is_tiled: 0 nodatavals: (-9999.0,) scales: (1.0,) offsets: (0.0,) descriptions: ('band 4 surface reflectance',) ``` #### Problem description Because each band file has the same band index of ""1"", concatenating on an index called ""band"" won't result in a dataset where you can subset bands with different indices. I'm working on this at the scipy sprint, writing a new Landsat SR specific file opener and contacting the data provider to let them know that the metadata's band attribute should reflect the band number ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3108/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue