☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

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

Community Support
pratikkgandhi
pratikkgandhi

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

⌁   Link to post
Bryan
Bryan

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, pratikkgandhi@gmail.com 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 bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
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\.

⌁   Link to post
pratikkgandhi
pratikkgandhi

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, pratik...@gmail.com 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 bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

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.

⌁   Link to post

End of archived discussion · Replies are disabled