Error in line 554: expected array of dim 2
Opened this issue · 8 comments
\GarminCustomMap.py", line 554, in run
t_file.GetRasterBand(1).WriteArray(t_band_1)
File "C:\PROGRA1\QGIS31.4\apps\Python37\lib\site-packages\osgeo\gdal.py", line 2653, in WriteArray
callback_data=callback_data)
File "C:\PROGRA1\QGIS31.4\apps\Python37\lib\site-packages\osgeo\gdal_array.py", line 394, in BandWriteArray
raise ValueError("expected array of dim 2")
ValueError: expected array of dim 2
To avoid issue #9, I turned off "Skip production of empty tiles". Now instead of throwing an error at line 551, it throws an error at 554.
Could you please provide a step by step example to reproduce the error?
Using Windows 10 and QGIS 3.4.3, open new project. From QuickMapServices load OSM Standard. Change project CRS to 4326 and zoom to island of Sardegna. Drag the panel over to limit the canvas to just the island. Run the plugin with 10 as the zoom factor and uncheck "Skip production of empty tiles".
I'm wondering if the problem is the shape of the canvas -- taller than it is wide, i.e. portrait instead of landscape. If I move the panel back to create a wider canvas, it runs without error.
It only happens when the height is taller than the width. Yours shows one with a height shorter than the width (5 by 11).
I still cannot reproduce the error. I set the layers panel really with and set the scale as it is in your image.
I'm not sure what to say, I tried these steps on another computer with a brand new QGIS install and still got the error. How many tiles were produced when you ran it without error?
Having this issue on QGIS 3.6.2 (Windows 10). Like OP "To avoid issue #9 , I turned off "Skip production of empty tiles". Now instead of throwing an error at line 551, it throws an error at 554."