-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Gantt chart docs - TypeError: Object of type timedelta is not JSON serializable #4145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@helen-fornazier which example in the docs specifically generated the error? I was able to run the first few examples successfully with the same version as you. |
the first example: import plotly.express as px
import pandas as pd
df = pd.DataFrame([
dict(Task="Job A", Start='2009-01-01', Finish='2009-02-28'),
dict(Task="Job B", Start='2009-03-05', Finish='2009-04-15'),
dict(Task="Job C", Start='2009-02-20', Finish='2009-05-30')
])
fig = px.timeline(df, x_start="Start", x_end="Finish", y="Task")
fig.update_yaxes(autorange="reversed") # otherwise tasks are listed from the bottom up
fig.show() and just for information:
|
All the first examples before The |
@helen-fornazier Are you using Pandas 2? Then the fix might be here: #4103 |
I'm experiencing the same issue.
Which version of pandas should we use? |
@arg0d A downgrade to
|
Yes, I was using |
Since #4103 has been merged about an hour ago (and closed #4102), this one here can be closed too, can't it? @helen-fornazier |
@helen-fornazier would you try again with the new v5.14.1 and pandas v2.0.0 and let us know if the issue is resolved? Thanks! |
It works! Looks solved. Thanks! Closing the issue. |
Hi,
I am following this docs to generate a gantt chart https://github.com/plotly/plotly.py/blob/doc-prod/doc/python/gantt.md
But this is what I get:
I installed with pip, and the version is the same indicated on top here https://plotly.com/python/gantt/
So I'm wondering if this is a bug or if I'm doing something wrong, or maybe the docs is outdated (and I can help with that once I figure the right way to implement it).
Thanks.
The text was updated successfully, but these errors were encountered: