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

Offen
#5,046 7 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug P2 regression
Vorherrschende Sprache
Python
Sterne
18.8k
Forks
2.8k
Ø Merge
16 Std. 26 Min.
Gemergte PRs (30 T.)
21

Beschreibung

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'))

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Es werden keine Quelldateien oder Tests genannt. Reproduziere das angegebene cf.subplots-Beispiel mit den aufgeführten Versionen von Python, pandas, Plotly und cufflinks und verfolge anschließend den DataFrame.figure/cf.subplots-Pfad, der die Farbe der Balken-Markerlinie erzeugt. Erledigt ist die Aufgabe, wenn das Beispiel ohne den ungültigen Text np.float64 im Farbwert erstellt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
jupyter-notebook, pandas, plotly, python
Bereich
data-visualization
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.