The SentinelHub plugin won’t start due to this error message

2021-09-02T11:57:18 WARNING Traceback (most recent call last):
File “C:/Users/philippe.jetten/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SentinelHub\main.py”, line 103, in run
self.initialize_ui()
File “C:/Users/philippe.jetten/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SentinelHub\main.py”, line 185, in initialize_ui
self.update_current_map_layers()
File “C:/Users/philippe.jetten/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SentinelHub\main.py”, line 520, in update_current_map_layers
layer_names = [layer.name() for layer in qgis_layers]
File “C:/Users/philippe.jetten/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SentinelHub\main.py”, line 520, in
layer_names = [layer.name() for layer in qgis_layers]
AttributeError: ‘NoneType’ object has no attribute ‘name’

Hi @philippe.jetten,

I’m somehow unable to reproduce this error and I have tried using the plugin for various QGIS versions from 3.0 to 3.20. Which QGIS version do you use?

Could you perhaps try using the plugin from an empty QGIS project or at least clearing all the layers in the “Layers” menu:

layers-menu

Somehow QGIS API provides a None object for one of the layers in your Layers menu. I’m not sure why, but we’ll have to handle this case in the next version. Thank you for reporting the issue.

I’m using 3.18.3. I tried opening the layers on a blank project and it all works fine, except it’s on the default Sentinel projection. My project is on NAD83 (EPSG6622) and QGIS makes me switch to the project projection. When I try rezoom on layer, it zooms out way too much although nothing at all appears on the satellite background. And yes, the imported layer is positionned above all on my layers panel.

Note that Sentinel Hub doesn’t support EPSG6622. The list of crs that are supported in SH can be found here.

What do you mean by “… QGIS makes me switch to the project projection”? You should be able to set your project projection in QGIS under “Project” → “Properties” → “CRS”.