error handling message Message 'PATCH-DOC' (revision 1): AttributeError("'tuple' object has no attri

Hello,

I am getting this very bizarre error which says error handling message Message ‘PATCH-DOC’ (revision 1): AttributeError("‘tuple’ object has no attribute ‘Dt’",). My code snippet looks something like following:

CAH_cds = ColumnDataSource(data=dict(Dt=,Census=,CountAtStart=))

def update_plot():

mon_val = 9

current = CAH[CAH.Month == int(mon_val)],

CAH_cds.data = {

‘Dt’ : current.Dt,

‘Census’ : current.Census,

‘CountAtStart’ : current.CountAtStart,

}

Any ideas?

Thanks,

Pratik

The problem is the trailing comma in this line:

  current = CAH[CAH.Month == int(mon_val)],

That makes current be one-item tuple, which is what causes the AttributeError when you try to access current.Dt

Thanks,

Bryan

···

On Jan 9, 2017, at 10:00 AM, [email protected] wrote:

Hello,

I am getting this very bizarre error which says error handling message Message 'PATCH-DOC' (revision 1): AttributeError("'tuple' object has no attribute 'Dt'",). My code snippet looks something like following:

CAH_cds = ColumnDataSource(data=dict(Dt=,Census=,CountAtStart=))

def update_plot():
    mon_val = 9
    current = CAH[CAH.Month == int(mon_val)],
    CAH_cds.data = {
        'Dt' : current.Dt,
        'Census' : current.Census,
        'CountAtStart' : current.CountAtStart,
    }

Any ideas?

Thanks,
Pratik

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/4786509a-5eeb-4fa9-a2c3-5c3049b78b22%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Thanks Bryan!

That helped. Really appreciate for your help!

Pratik

···

On Monday, 9 January 2017 11:08:58 UTC-5, Bryan Van de ven wrote:

The problem is the trailing comma in this line:

    current = CAH[CAH.Month == int(mon_val)],

That makes current be one-item tuple, which is what causes the AttributeError when you try to access current.Dt

Thanks,

Bryan

On Jan 9, 2017, at 10:00 AM, [email protected] wrote:

Hello,

I am getting this very bizarre error which says error handling message Message ‘PATCH-DOC’ (revision 1): AttributeError(“‘tuple’ object has no attribute ‘Dt’”,). My code snippet looks something like following:

CAH_cds = ColumnDataSource(data=dict(Dt=,Census=,CountAtStart=))

def update_plot():

mon_val = 9
current = CAH[CAH.Month == int(mon_val)],
CAH_cds.data = {
    'Dt'           : current.Dt,
    'Census'       : current.Census,
    'CountAtStart' : current.CountAtStart,
}

Any ideas?

Thanks,

Pratik


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/4786509a-5eeb-4fa9-a2c3-5c3049b78b22%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.