When trying to inspect a Future in the Jupyter Notebook, an issue cropped up trying to represent it. Looks like it assumes a key is a str when it is in fact a tuple. Running distributed version 1.20.1.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/opt/conda3/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj)
343 method = get_real_method(obj, self.print_method)
344 if method is not None:
--> 345 return method()
346 return None
347 else:
/opt/conda3/lib/python3.6/site-packages/distributed/client.py in _repr_html_(self)
334 typ = str(self.type)
335 text += '<font color="gray">type: </font>%s, ' % typ
--> 336 text += '<font color="gray">key: </font>%s' % html_escape(self.key)
337 return text
338
/opt/conda3/lib/python3.6/html/__init__.py in escape(s, quote)
17 translated.
18 """
---> 19 s = s.replace("&", "&") # Must be done first!
20 s = s.replace("<", "<")
21 s = s.replace(">", ">")
AttributeError: 'tuple' object has no attribute 'replace'
<Future: status: finished, type: Array, key: ('store-rechunk-merge-9d56828f48fdb9af2a81e6b10a09d976', 3, 3, 0)>
When trying to inspect a
Futurein the Jupyter Notebook, an issue cropped up trying to represent it. Looks like it assumes akeyis astrwhen it is in fact atuple. Runningdistributedversion 1.20.1.