GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — fix: handle empty px.histogram() by skipping None label in hover template by tysoncung · Pull Request #5535 · plotly/plotly.py Conversation
Contributor
Summary
Root CauseThe histogram-specific hover label path in hover_lines = [k + "=" + v for k, v in mapping_labels_copy.items()] # None + "=" + ... → TypeError FixSkip adding to TestAdded Fixes #5534
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsWhen px.histogram() is called with no data arguments, the histogram-
specific hover label path inserts a None key into mapping_labels
(because attr_label is None when no column is specified). The hover
template list comprehension then fails with:
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Skip adding to mapping_labels when attr_label is None, consistent
with how other chart types handle empty invocations.
Fixes plotly#5534
emilykl
self-requested a review
emilykl
approved these changes
|
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |