xarray-contrib / xarray_leaflet

An xarray extension for tiled map plotting.
https://xarray-leaflet.readthedocs.io
MIT License
163 stars 21 forks source link

Attribute error on open_rasterio function #38

Closed 12rambau closed 3 years ago

12rambau commented 3 years ago

My Travis build started to crash on a xarray_leaflet test 4 days ago.

I use the latest release (0.1.13) and I share with you the full traceback :

Traceback (most recent call last):
599  File "/home/travis/build/12rambau/sepal_ui/tests/test_SepalMap.py", line 82, in test_remove_local_raster
600    m.add_raster(dem, colormap='terrain', layer_name='DEM')
601  File "/home/travis/build/12rambau/sepal_ui/sepal_ui/mapping/mapping.py", line 348, in add_raster
602    da = rioxarray.open_rasterio(image, masked=True)
603  File "/home/travis/virtualenv/python3.8.7/lib/python3.8/site-packages/rioxarray/_io.py", line 868, in open_rasterio
604    result._file_obj = manager
605  File "/home/travis/virtualenv/python3.8.7/lib/python3.8/site-packages/xarray/core/common.py", line 276, in __setattr__
606    raise AttributeError(
607AttributeError: cannot set attribute '_file_obj' on a 'DataArray' object. Use __setitem__ styleassignment (e.g., `ds['name'] = ...`) instead of assigning variables.

If you need any additional information please let me know