SentinelHub package installation

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.

1 Like