You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Steven,
first of all, thanks a lot for your package...it's such a great help!
I followed along your Multi-Target Spatial Prediction using the Meuse Dataset tutorial to modify it for a RF implementation.
I tried to work with a stacked raster dataset of mine but eventually always run in the same error. For example, when executing this code:
TypeError Traceback (most recent call last)
TypeError: read() takes 1 positional argument but 2 were given
Exception ignored in: 'rasterio._filepath.filepath_read'
Traceback (most recent call last):
File "[c:...new_venv\lib\site-packages\rasterio\io.py]", line 224, in open
return DatasetReader(mempath, driver=driver, sharing=sharing, **kwargs)
TypeError: read() takes 1 positional argument but 2 were given
AttributeError Traceback (most recent call last)
File rasterio_filepath.pyx:141, in rasterio._filepath.filepath_seek()
AttributeError: 'RasterLayer' object has no attribute 'seek'
Exception ignored in: 'rasterio._env.log_error'
Traceback (most recent call last):
File "rasterio_filepath.pyx", line 141, in rasterio._filepath.filepath_seek
AttributeError: 'RasterLayer' object has no attribute 'seek'
Do you have an idea what could cause this? I made sure that all rasters have only one band
The text was updated successfully, but these errors were encountered:
stack.names returns the actual dict_keys for most of the rasters but as soon as I add annual_prec and/or "aspect" to predictor_files, it returns an empty "dict_keys([])". The path is correct and the resolution is also the same. Any idea why this could be?
It seems like it's quite random, cause I had a third raster which didn't work at first, but works now after processing it just the same way as before.
Thanks a lot!
EDIT:
So, I can stack the layers with rasterio and then load the stacked raster with pyspatialml. The bands are renamed by pyspatialml to stack_01, stack_02, etc. When I try to rename the the bands, I get the "read() takes 1 positional argument but 2 were given" and "read() takes 1 positional argument but 2 were given" errors but it eventually renames the names.
In the end, I got the model running like that.
Hey Steven,
first of all, thanks a lot for your package...it's such a great help!
I followed along your Multi-Target Spatial Prediction using the Meuse Dataset tutorial to modify it for a RF implementation.
I tried to work with a stacked raster dataset of mine but eventually always run in the same error. For example, when executing this code:
it returns an:
Do you have an idea what could cause this? I made sure that all rasters have only one band
The text was updated successfully, but these errors were encountered: