UnicodeEncodeError ( 'utf-8' codec can't encode character '\udc73')

Hy folks,
I was trying to do the examples given at:
And I couldn´t plot the layout example. The error msg that was showed was:

UnicodeEncodeError [Call holoviews.ipython.show_traceback() for details]
‘utf-8’ codec can’t encode character ‘\udc73’ in position 1: surrogates not allowed

Someone can help me to resolve this?

Could you provide a minimal example that reproduces your issue?

Here is the example that I was trying (it came from the User Guide in the Holoview website):

points = hv.Points(np.random.rand(400, 4))
bins = [0, .25, 0.5, .75, 1]
labels = [‘circle’, ‘triangle’, ‘diamond’, ‘circle’]
layout= hv.Layout([
points.relabel(‘Alpha’).opts(alpha =dim(‘x’).norm()),
points.relabel(‘Angle’).opts(angle =dim(‘x’).norm()*360, marker=‘dash’),
points.relabel(‘Marker’).opts(marker=dim(‘x’).bin(bins, labels),

layout.opts(opts.Points(width=250, height=250, xaxis=None, yaxis=None)).cols(5)

I realized that the error is in the ‘points.relabel(‘Marker’)’ line above. Probably is in the ‘bin function’

Could you provide some version info? Particularly your Python version.

anaconda custom py37_1

I get the same issue following the same example.
(Python 3.7.4, jupyter lab 2.1.2, holoviews 1.13.2, bokeh 2.0.2, running on Windows if that matters)
Using categorize after bin() with just the first arg instead of bins with a label arg works:

layout = hv.Layout([  
   points.relabel('Marker').opts(marker=dim('x').bin(bins).categorize({0.125: 'circle', 0.375: 'triangle', 0.625: 'diamond', 0.875: 'square'})),

Digging into things a bit:

points = hv.Points(np.random.rand(400,4))
bins= [0.0, .25, .5, .75, 1.0]
labels=['circle', 'triangle', 'diamond', 'square', 'circle']
bin_op = dim('Marker').bin(bins)
cated = dim(bin_op).categorize({0.125: 'circle', 0.375: 'triangle', 0.625: 'diamond', 0.875: 'square'})
ds = hv.Dataset(points.data, ['x', 'y'], ['Marker'])

gives an output of:

array(['triangle', 'diamond', ...

as expected. While:

bins= [0.0, .25, .5, .75, 1.0]
labels=['circle', 'triangle', 'diamond', 'square', 'circle']
bin_op = dim('Marker').bin(bins, labels)
ds = hv.Dataset(points.data, ['x', 'y'], ['Marker'])

gives the output:

array(['\uf440\udc74\uf000\udc69\uf180\udc6e\uf100\udc6c\x00\x00렲\udf70Տ', ... (continues with similar values)

Hope this helps.