plotly / plotly/plotly.py

Error Received value: 'rgba(255, 153, 51, np.float64(1.0))' when using cufflinks to make figures after upgrading python to 3.13.2 and plotly to 6.0.0

Open
#5,046 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P2 regression
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

I needed to rebuild my windows workstation (win 10) and decided to install the latest python and plotly software.
Now all my charts using cufflinks fail with the error:

ValueError:
Invalid value of type 'builtins.str' received for the 'color' property of bar.marker.line
Received value: 'rgba(255, 153, 51, np.float64(1.0))'

Edition Windows 10 Pro
Version 22H2
Installed on ‎17/‎02/‎2025
OS build 19045.5487
Experience Windows Feature Experience Pack 1000.19061.1000.0

Python 3.13.2
pandas 2.2.3
plotly 6.0.0
cufflinks 0.17.3

The below code will recreate the issue in Jupiter labs

from plotly.subplots import make_subplots
import plotly.graph_objects as go
import plotly.io as pio
import pandas as pd
import cufflinks as cf

index=['2024-09-05 05:56:33.238','2024-09-05 05:56:34.238','2024-09-05 05:56:35.241','2024-09-05 05:56:36.239','2024-09-05 05:56:37.239',
       '2024-09-05 05:56:38.241','2024-09-05 05:56:39.239','2024-09-05 05:56:40.239','2024-09-05 05:56:41.240','2024-09-05 05:56:42.240']

cols=pd.MultiIndex.from_tuples([
('rcount','0:3:1'),('rcount','0:3:2'),('rcount','1:3:1'),('rcount','1:3:2'),
('wcount','0:3:1'),('wcount','0:3:2'),('wcount','1:3:1'),('wcount','1:3:2'),
('tcount','0:3:1'),('tcount','0:3:2'),('tcount','1:3:1'),('tcount','1:3:2'),])

data=[[22.0,21.0,32.0,31.0,24.0,20.0,40.0,40.0,47.0,42.0,72.0,72.0],
[0.0,0.0,0.0,0.0,4.0,2.0,4.0,1.0,4.0,2.0,4.0,1.0],
[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],
[0.0,0.0,0.0,1.0,0.0,0.0,2.0,4.0,0.0,0.0,2.0,5.0],
[0.0,0.0,0.0,0.0,3.0,1.0,16.0,11.0,3.0,1.0,16.0,11.0],
[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],
[0.0,0.0,0.0,0.0,1.0,0.0,1.0,0.0,1.0,0.0,1.0,0.0],
[0.0,0.0,1.0,0.0,4.0,2.0,9.0,0.0,4.0,2.0,11.0,0.0],
[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],
[0.0,0.0,0.0,0.0,2.0,1.0,2.0,1.0,2.0,1.0,2.0,1.0]]

df=pd.DataFrame(data, columns=cols,index=index)

fig = cf.subplots([df.loc[:,('rcount')].figure(kind='scatter'),
                    df.loc[:,('wcount')].figure(kind='scatter'),
                    df.loc[:,('tcount')].figure(kind='scatter'),],
                    shape=(3,1),shared_xaxes=True,shared_yaxes=False,subplot_titles=('READ','WRITE','TOTAL'))

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Reproduce the provided cf.subplots example with the listed Python, pandas, Plotly, and cufflinks versions, then trace the DataFrame.figure/cf.subplots path that produces the bar marker-line color. Done means the example builds without the invalid np.float64 text in the color value.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, pandas, plotly, python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.