Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tile band becomes None type #9

Open
ninsbl opened this issue Feb 28, 2019 · 4 comments
Open

tile band becomes None type #9

ninsbl opened this issue Feb 28, 2019 · 4 comments

Comments

@ninsbl
Copy link
Contributor

ninsbl commented Feb 28, 2019

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
Copy link
Contributor

ghtmtt commented Mar 1, 2019

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

@ninsbl
Copy link
Contributor Author

ninsbl commented Mar 1, 2019

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
Copy link

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

@kellerbaum
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants