Improved KeyError exception message in DynamicMap._initial_key
@@ -610,8 +610,11 @@ class DynamicMap(HoloMap):
else:
undefined.append(kdim)
if undefined:
- raise KeyError('dimensions do not specify a range or values, '
- 'cannot supply initial key' % ', '.join(undefined))
+ msg = ('Dimensions {undefined_dims} do not specify range or values needed '
+ 'to generate initial key')
+ undefined_dims = ', '.join(['%r' % str(dim) for dim in undefined])
+ raise KeyError(msg.format(undefined_dims=undefined_dims))
+
return tuple(key)
