NINAnor / GarminCustomMaps

The GarminCustomMap plugin exports the current map canvas to a .kmz-file, which is compatible with Garmin`s Custom Maps format for handheld GPS units. That way individual maps styled in QGIS can be used as background (raster) maps on the compatible Garmin GPS units, like Alpha, Astro, Dakota, Oregon, Colorado, GPSMAP 62 series, GPSMAP 64 series, GPSMAP 78 series, Edge 800, Montana, Rino, eTrex® 20 and 30.
GNU General Public License v2.0
17 stars 6 forks source link

tile band becomes None type #9

Open ninsbl opened 5 years ago

ninsbl commented 5 years ago

Maybe a corner case, but for a mainly black map canvas the following error pops up:

Traceback (most recent call last): File "C:/Users/stefan.blumentrath/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\GarminCustomMap\GarminCustomMap.py", line 551, in run if t_band_1.min() == 255 and t_band_2.min() == 255 and t_band_3.min() == 255 : AttributeError: 'NoneType' object has no attribute 'min'

ghtmtt commented 5 years ago

Do you think a QgsMessageBar is enough to inform the user about this corner case?

ninsbl commented 5 years ago

Do you think a QgsMessageBar is enough to inform the user about this corner case? Yes, that would be absolut sufficient. However, on a second thought, the reason for the error message can also be that mapcanvas settings got messed up when I tried to replicate #8 and the process exited premature. Maybe an improved atexit procedure would be needed in the long run...

jwidness commented 5 years ago

I'm getting the same NoneType error and my canvas isn't mostly black.

kellerbaum commented 4 years ago

Same error. In my case i converted was changing crs from what the layer was created in to WGS 84 to send to garmin. Created the layer in wgs 84 solved in my case.