Bokeh: passing Auto to DataTable 'height' arg raises ValidationError

Created on 16 Feb 2016  路  3Comments  路  Source: bokeh/bokeh

From source:

height = Either(Int(400), Auto, help="""
    Height in pixels of the table widget. Use ``Auto`` to make the widget
    adjust its height automatically. Note that ``Auto`` is inefficient for
    large amounts of data, so should be used with care.
    """)

However doing the following raises a ValueError:

from bokeh.models import Auto
from bokeh.models.widgets import DataTable

DataTable(height=Auto)
>> ValueError: expected an element of either Int or Auto, got <class 'bokeh.core.properties.Auto'>

DataTable(height=Auto())
ValueError: expected an element of either Int or Auto, got <bokeh.core.properties.Auto object at 0x10ba9bef0>

invalid widgets bug

Most helpful comment

height = "auto" does not work with bokeh 0.12.6. Error is

ValueError: expected a value of type Integral, got auto of type str

All 3 comments

This works for me if I use height="auto"

Auto is the property type, height="auto" is the actual correct user usage.

height = "auto" does not work with bokeh 0.12.6. Error is

ValueError: expected a value of type Integral, got auto of type str

Was this page helpful?
0 / 5 - 0 ratings

Related issues

darribas picture darribas  路  3Comments

nmvasani picture nmvasani  路  3Comments

thoth291 picture thoth291  路  4Comments

jnettels picture jnettels  路  3Comments

tommycarstensen picture tommycarstensen  路  4Comments