ERROR:bokeh.core.validation.check:E-1001 (BAD_COLUMN_NAME): Glyph refers to nonexistent column name. This could either be due to a misspelling or typo, or due to an expected column being missing. : key "fill_color" value "leet_labels", key "hatch_color" value "leet_labels", key "line_color" value "leet_labels" [renderer: GlyphRenderer(id='2403', ...)]
I was able to resolve the error/warning being thrown. Essentially, we assign the color in the GlyphRenderer scatter2 to a mapper object we create. The cmap mapper we create needs a field_name assigned to know from which column to assign the colors. From what I understand, Bokeh wants that field_name to exist in the Column Data Source (s2) when the mapper is assigned, so all we need to do is assign it to an empty list when its created. From some of the last lines of the code, we assign the topic_field (and thereby the field_name in the get_color_mapping) to "leet_labels". Let me know if this resolves the issue on your end and is also a good solution based on how things are implemented. I tested it and I don't think this affects any of the functionality of the program. I also removed some unnecessary commented out code.
I was able to resolve the error/warning being thrown. Essentially, we assign the
color
in the GlyphRendererscatter2
to a mapper object we create. The cmap mapper we create needs afield_name
assigned to know from which column to assign the colors. From what I understand, Bokeh wants thatfield_name
to exist in the Column Data Source (s2
) when the mapper is assigned, so all we need to do is assign it to an empty list when its created. From some of the last lines of the code, we assign thetopic_field
(and thereby thefield_name
in theget_color_mapping
) to "leet_labels". Let me know if this resolves the issue on your end and is also a good solution based on how things are implemented. I tested it and I don't think this affects any of the functionality of the program. I also removed some unnecessary commented out code.