# \[bokeh\] error using 'bokeh serve' and list of circle sizes

**URL:** <https://discourse.bokeh.org/t/bokeh-error-using-bokeh-serve-and-list-of-circle-sizes/2325>\
**Category:** Community Support\
**Created:** [July 14, 2017, 6:45pm UTC](https://discourse.bokeh.org/t/bokeh-error-using-bokeh-serve-and-list-of-circle-sizes/2325 "2017-07-14T18:45:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bryan](https://discourse.bokeh.org/user_avatar/discourse.bokeh.org/bryan/32/3625_2.png) [@Bryan](https://discourse.bokeh.org/u/Bryan)\
**Post date:** [July 14, 2017, 6:45pm UTC](https://discourse.bokeh.org/t/bokeh-error-using-bokeh-serve-and-list-of-circle-sizes/2325/1 "2017-07-14T18:45:50Z")

</div>

Hi

This is a bug, there is already an issue you can track:

&nbsp;&nbsp;[screen distance spec fields fail with bokeh.client · Issue #6409 · bokeh/bokeh · GitHub](https://github.com/bokeh/bokeh/issues/6409)

Thanks,

Bryan

> **···**
>
> > On Jul 14, 2017, at 12:19, bpuchala@gmail.com wrote:
> > 
> > import numpy as np
> > 
> > import bokeh.models  
> > from bokeh.plotting import figure, curdoc  
> > from bokeh.client import push\_session
> > 
> > # create a plot and style its properties  
> > fig = figure(x\_range=(0, 100), y\_range=(0, 100), toolbar\_location=None)
> > 
> > x\_data = np.array([0,2,4])  
> > y\_data = np.array([0, 2, 4])  
> > size\_data = np.array([1, 1, 2])
> > 
> > source = bokeh.models.ColumnDataSource(data={'x':x\_data, 'y':y\_data, 'size':size\_data})
> > 
> > #OK always:  
> > #fig.circle(x='x', y='y', radius='size', source=source)
> > 
> > #OK if server=False; FAIL, if server=True:  
> > fig.circle(x='x', y='y', size='size', source=source)  
> > # error handling message Message 'PATCH-DOC' (revision 1):  
> > # ValueError("expected an element of either String, Dict(Enum('field', 'value', 'transform'),  
> > # Either(String, Instance(Transform), Float)) or Float, got {u'units': u'screen', u'field': u'size'}",)
> > 
> > server = True
> > 
> > if server is False:  
> > &nbsp;&nbsp;&nbsp;&nbsp;# run with 'bokeh serve --show test\_bokeh.py'  
> > &nbsp;&nbsp;&nbsp;&nbsp;curdoc().add\_root(fig)  
> > else:  
> > &nbsp;&nbsp;&nbsp;&nbsp;# run 'bokeh serve' first, then 'python test\_bokeh.py  
> > &nbsp;&nbsp;&nbsp;&nbsp;# using: 'Starting Bokeh server version 0.12.6 (running on Tornado 4.5.1)'  
> > &nbsp;&nbsp;&nbsp;&nbsp;  
> > &nbsp;&nbsp;&nbsp;&nbsp;# set up session  
> > &nbsp;&nbsp;&nbsp;&nbsp;session = push\_session(curdoc())  
> > &nbsp;&nbsp;&nbsp;&nbsp;curdoc().add\_root(fig)  
> > &nbsp;&nbsp;&nbsp;&nbsp;session.show() # open the document in a browser  
> > &nbsp;&nbsp;&nbsp;&nbsp;session.loop\_until\_closed() # run forever

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads.bokeh.org/original/2X/1/14eb24f9e10e4e9b78e3f10f66c04ffa96446e5a.svg) [@system](https://discourse.bokeh.org/u/system)\
**Post date:** [July 21, 2021, 9:12pm UTC](https://discourse.bokeh.org/t/bokeh-error-using-bokeh-serve-and-list-of-circle-sizes/2325/2 "2021-07-21T21:12:27Z")

</div>


