You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are still Nonetype related errors after fixing #248.
When array[0] is None, the code fails on line 682 with an AttributeError:
/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/contextily/plotting.py:134: in add_basemap
image, extent = bounds2img(
/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/contextily/tile.py:287: in bounds2img
merged, extent = _merge_tiles(tiles, arrays)
/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/contextily/tile.py:682: in _merge_tiles
h, w, d = arrays[0].shape
E AttributeError: 'NoneType' object has no attribute 'shape'
If the first array is valid, but any of the other arrays is None, the issue surfaces a bit lower as a TypeError:
/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/contextily/plotting.py:134: in add_basemap
image, extent = bounds2img(
/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/contextily/tile.py:287: in bounds2img
merged, extent = _merge_tiles(tiles, arrays)
/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/contextily/tile.py:692: in _merge_tiles
img[y * h : (y + 1) * h, x * w : (x + 1) * w, :] = arr
E TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
I cannot fully grasp what is happening here. I imagined that image=None, and was looking at this part of the code:
However, this prints () and does not give the error above. @martinfleis do you have an idea how the image variable looks like when this error occurs? Or is my minimal reproduction example faulty?
The text was updated successfully, but these errors were encountered:
Follow-up from #247
There are still Nonetype related errors after fixing #248.
When
array[0]
is None, the code fails on line 682 with anAttributeError
:If the first array is valid, but any of the other arrays is
None
, the issue surfaces a bit lower as aTypeError
:I cannot fully grasp what is happening here. I imagined that
image=None
, and was looking at this part of the code:contextily/contextily/tile.py
Lines 454 to 457 in 0e38541
So I guess that would lead to this minimal example:
However, this prints
()
and does not give the error above. @martinfleis do you have an idea how theimage
variable looks like when this error occurs? Or is my minimal reproduction example faulty?The text was updated successfully, but these errors were encountered: