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
It is possible to render a layout with an odd number of instances of Map() with the default N_SIZE and M_SIZE values. However, the result is a single row of containing several maps, a layout which may not be ideal in all circumstances. However, when I attempt to render a Layout() instance with a defined N_SIZE and M_SIZE values and an odd number of instances of Map(), the rendering fails.
fromcartoframes.vizimportLayout, Map# Generate list of 3 instances of Map()maps_list= [Map() forminrange(3)]
# Add the list of 3 maps to a 2x2 layoutLayout(maps=maps_list, n_size=2, m_size=2)
Error message:
---------------------------------------------------------------------------
UndefinedError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/IPython/core/formatters.py in __call__(self, obj)
336 method = get_real_method(obj, self.print_method)
337 if method is not None:
--> 338 return method()
339 return None
340 else:
10 frames
/usr/local/lib/python3.6/dist-packages/jinja2/environment.py in getitem(self, obj, argument)
450 """Get an item or attribute of an object but prefer the item."""
451 try:
--> 452 return obj[argument]
453 except (AttributeError, TypeError, LookupError):
454 if isinstance(argument, string_types):
UndefinedError: list object has no element 3
The text was updated successfully, but these errors were encountered:
Problem
It is possible to render a layout with an odd number of instances of
Map()
with the defaultN_SIZE
andM_SIZE
values. However, the result is a single row of containing several maps, a layout which may not be ideal in all circumstances. However, when I attempt to render a Layout() instance with a definedN_SIZE
andM_SIZE
values and an odd number of instances ofMap()
, the rendering fails.Version Info
Code Snippet
See this Colab Notebook for a runnable version
Error message:
The text was updated successfully, but these errors were encountered: