Skip to main content

I have come across this error:


ImportError Traceback (most recent call last)

in

20 #sentinelhub imports

21

—> 22 from sentinelhub import BBoxSplitter, BBox, CRS, DataSource, transform_bbox, GeopediaFeatureIterator


ImportError: cannot import name ‘transform_bbox’ from ‘sentinelhub’ (C:\Users\ASUS\Anaconda3\envs\ASV\lib\site-packages\sentinelhub_init_.py)


When trying to import the following:



from sentinelhub import BBoxSplitter, BBox, CRS, DataSource, transform_bbox, GeopediaFeatureIterator


The transform_bbox method has been removed from sentinelhub-py, as the same can be achieved by


bbox.transform(to_crs)

Just remove the transform_bbox from the imports, and replace the transform_bbox(bbox, crs) with the code above.


Hi! I am also using the github repository of BLUEDOT — Water Resources Monitoring from Space but I am facing this error as follows:

File “/content/gdrive/MyDrive/water-observatory-backend-master/water-observatory-backend-master/src/s2_water_extraction.py”, line 6, in
from sentinelhub.download import ImageDecodingError
ImportError: cannot import name ‘ImageDecodingError’ from ‘sentinelhub.download’ (/usr/local/lib/python3.7/dist-packages/sentinelhub/download/init.py)

if you can help me, please?


BlueDot uses an much older version of sentinelhub-py library (2.5.3 according to the pipfile.lock).


Could you check with sh-py version you are using?


Thank you for your quick response
I have solved this error by replacing the sentinlhub.download with sentinelhub.decoding

and version of my sh-py is 3.6.1


Hi! 
I am facing another error in BlueDot of data_collection parameter in s2_water_extraction.py. This parameter is not present there, I have added by myself as follows:
data_collection = DataCollection.Sentinel2_L1C and I have tried Sentinel2_L2A as well. but I am facing the error as follows:

 

Kindly please help me, Thank you in anticipation


Reply