Open tomchadwin opened 5 years ago
Thanks for the ticket Tom. What kind of source did you use?
A server.
Slightly different error, triggered by the same conditions - canvas is zoomed way out to world level:
ValueError: cannot convert float NaN to integer
Traceback (most recent call last):
File "C:/Users/tchadwin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\vector_tiles_reader\plugin\vtr_plugin.py", line 356, in _on_zoom_change
self._update_nr_of_tiles(zoom)
File "C:/Users/tchadwin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\vector_tiles_reader\plugin\vtr_plugin.py", line 359, in _update_nr_of_tiles
bounds = self._get_visible_extent_as_tile_bounds(zoom=zoom)
File "C:/Users/tchadwin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\vector_tiles_reader\plugin\vtr_plugin.py", line 662, in _get_visible_extent_as_tile_bounds
tile_bounds = get_tile_bounds(zoom, extent=bounds, scheme=scheme, source_crs=str(source_crs))
File "C:/Users/tchadwin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\vector_tiles_reader\plugin\util\tile_helper.py", line 212, in get_tile_bounds
xy_min = latlon_to_tile(zoom=zoom, lat=lat_min, lng=lng_min, source_crs=source_crs, scheme=scheme)
File "C:/Users/tchadwin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\vector_tiles_reader\plugin\util\tile_helper.py", line 145, in latlon_to_tile
col, row = gm.MetersToTile(mx=lng, my=lat, zoom=zoom) # GlobalMercator returns in TMS scheme here
File "C:/Users/tchadwin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\vector_tiles_reader\plugin\util\global_map_tiles.py", line 227, in MetersToTile
return self.PixelsToTile(px, py)
File "C:/Users/tchadwin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\vector_tiles_reader\plugin\util\global_map_tiles.py", line 213, in PixelsToTile
tx = int(math.ceil(px / float(self.tileSize)) - 1)
ValueError: cannot convert float NaN to integer
Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
QGIS version: 3.8.3-Zanzibar Zanzibar, 685d8b15d2
Occurs as soon as VTR button clicked and dialog appears. To clarify, no VTR layers are on the canvas, just a SHP.
Canvas was EPSG:4326, and I was zoomed a long way out above Canada. Sorry not to have more precise details.
QGIS 3.8.3 VTR 3.1.0