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
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 18.8k
- Fork
- 2.8k
- Merge trung bình
- 16 giờ 26 phút
- Pull request đã merge (30 ngày)
- 21
Mô tả
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'))
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Không có tệp mã nguồn hoặc kiểm thử nào được nêu tên. Hãy tái hiện ví dụ cf.subplots đã cung cấp với các phiên bản Python, pandas, Plotly và cufflinks được liệt kê, sau đó lần theo đường đi DataFrame.figure/cf.subplots tạo ra màu đường viền marker của biểu đồ thanh. Hoàn tất khi ví dụ được xây dựng mà không có văn bản np.float64 không hợp lệ trong giá trị màu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- jupyter-notebook, pandas, plotly, python
- Lĩnh vực
- data-visualization
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 35/100