1

I'm trying to generate an offline image via Google Maps web layer using Genereate XYZ Tiles (MBTiles) and keep getting the following error (this has never happened before):

"Traceback (most recent call last):

File "C:\PROGRA~1/QGIS32~1.6/apps/qgis-ltr/./python/plugins\processing\algs\qgis\TilesXYZ.py", line 455, in processAlgorithm
self.generate(writer, parameters, context, feedback)
File "C:\PROGRA~1/QGIS32~1.6/apps/qgis-ltr/./python/plugins\processing\algs\qgis\TilesXYZ.py", line 316, in generate
for result in threadPool.map(self.renderSingleMetatile, metatiles_by_zoom[zoom]):
File "C:\PROGRA~1\QGIS32~1.6\apps\Python39\lib\concurrent\futures\_base.py", line 608, in result_iterator
yield fs.pop().result()
File "C:\PROGRA~1\QGIS32~1.6\apps\Python39\lib\concurrent\futures\_base.py", line 438, in result
return self.__get_result()
File "C:\PROGRA~1\QGIS32~1.6\apps\Python39\lib\concurrent\futures\_base.py", line 390, in __get_result
raise self._exception
File "C:\PROGRA~1\QGIS32~1.6\apps\Python39\lib\concurrent\futures\thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\PROGRA~1/QGIS32~1.6/apps/qgis-ltr/./python/plugins\processing\algs\qgis\TilesXYZ.py", line 230, in renderSingleMetatile
self.writer.write_tile(tile, tileImage)
File "C:\PROGRA~1/QGIS32~1.6/apps/qgis-ltr/./python/plugins\processing\algs\qgis\TilesXYZ.py", line 401, in write_tile
self._init_zoom_layer(tile.z)
File "C:\PROGRA~1/QGIS32~1.6/apps/qgis-ltr/./python/plugins\processing\algs\qgis\TilesXYZ.py", line 393, in _init_zoom_layer
self._execute_sqlite("UPDATE metadata SET value='{}' WHERE name='bounds'".format(bounds))
File "C:\PROGRA~1/QGIS32~1.6/apps/qgis-ltr/./python/plugins\processing\algs\qgis\TilesXYZ.py", line 373, in _execute_sqlite
conn.execute(cmd)

sqlite3.OperationalError: database is locked

Execution failed after 29.74 seconds"

Any ideas?

4
  • I've tried unchecking 'render' as answered in another thread but this hasn't solved it...
    – Donny
    Commented Jun 9, 2022 at 2:03
  • someone (or something) else is using your spatialite db - make them/it stop
    – Ian Turton
    Commented Jun 9, 2022 at 7:26
  • @Donny, It's likely that a request (UPDATE call) is opened to the DB and the request has not finished or was not closed properly. This is likely due to threading (threadPool.map()). Not sure how to fix it unfortunately.
    – PyMapr
    Commented Jun 9, 2022 at 7:29
  • I've download QGIS 3.16 Hannover and run the process to completion without issue. Anyone have an idea what's changed in 3.22?
    – Donny
    Commented Jun 10, 2022 at 2:47

0

Browse other questions tagged or ask your own question.