☰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

Brewer example cannot be replicated with AttributeError "patches"

Community Support
fan.peggy
fan.peggy
Hi all,
I want to use the brewer example found here:
http://bokeh.pydata.org/en/latest/docs/gallery/brewer.html


However, when I copied and pasted the codes directly, I get the error on lines:
p = figure()
p.patches([x2 for a in areas], list(areas.values()), color=colors, alpha=0.8, line_color=None)

AttributeError: 'NoneType' object has no attribute 'patches'

The same happened with I tried modifying the codes for my own data.
There are limited documentation on this and I don't know if this example is outdated.
Any help would be greatly appreciated!

Thanks,
Peggy

⌁   Link to post
Bryan
Bryan

Hi Peggy,

If figure is returning None, it makes me think you must be using a somewhat old version of Bokeh. Can you confirm what version of Bokeh you are running? You can run

  python -c "import bokeh; print(bokeh.__version__)"

from the command line to easily get the version.

Just as a reminder, in order to help up support people in the most efficient way, I'd like to encourage everyone to always provide basic information about versions, platform, browsers, etc.

Bryan

···

On Dec 10, 2015, at 1:20 PM, fan.peggy@gmail.com wrote:

Hi all,
I want to use the brewer example found here:
http://bokeh.pydata.org/en/latest/docs/gallery/brewer.html

However, when I copied and pasted the codes directly, I get the error on lines:
p = figure()
p.patches([x2 for a in areas], list(areas.values()), color=colors, alpha=0.8, line_color=None)

AttributeError: 'NoneType' object has no attribute 'patches'

The same happened with I tried modifying the codes for my own data.
There are limited documentation on this and I don't know if this example is outdated.
Any help would be greatly appreciated!

Thanks,
Peggy

--
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/60af9adc-c5a4-4881-ae42-c05033c10b2d%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