Skip to content

PersistentDict exception printing should be more useful

From here, I can't tell what exception was encountered when reading an invalid key file:

WW0 in test/test_array.py:194 the following warning was recorded:
 ../.env/site-packages/pytools/persistent_dict.py:506: UserWarning: pytools.persistent_dict.Writ
eOncePersistentDict(pyopencl-invoker-cache-v6) encountered an invalid key file for key b336975ae
f27135cbfc7b2602e2564d0ee8d2d3c761fa37df30fbdbe9cbc6cdf. Remove the directory '/var/lib/gitlab-r
unner/.cache/32/pytools/pdict-v2-pyopencl-invoker-cache-v6-py2.7.13.final.42/b336975aef27135cbfc
7b2602e2564d0ee8d2d3c761fa37df30fbdbe9cbc6cdf' if necessary. (caught: 's0')
  return self.fetch(key, _stacklevel=1)

It seems like using str(e) doesn't always give useful information. Perhaps we should use traceback.format_exc?

Edited by Matt Wala
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information