-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
uploading a second unnamed figure using chart-studio 1.0.0a2 causes error #1622
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
Thanks for giving it a try @michaelbabyn, I'm not able to reproduce your exact error, but I am seeing something weird on repeated calls to Do you get the error if you wait a couple of seconds in between calls to |
I don't think there's a race condition, I get the issue even after waiting a few seconds between the calls. I think there might be a couple of bugs here. What I was expecting was that a new plot and grid would be created on Chart Studio but plotly.py is trying to overwrite an existing plot named "plot from API". The other bug is that plotly.py cannot update "plot from API". |
Also, I only see that error if I change the number of traces in the grid. For example the code below works (although the data in the grid is unchanged). import plotly.graph_objs as go
import chart_studio.plotly as py
f = go.Figure()
f.add_scatter(y=[3,4,3,5])
py.plot(f)
f = go.Figure()
f.add_bar(y=[9,9,9,9])
py.plot(f) So it looks like the plot gets updated properly but the grid doesn't. |
Please try out |
@jonmmease , Sorry I didn't see this until now but I've been going through the chart studio docs using 1.0.0a4 and I'm now able to update the data for the grid of an existing plot but if I want to create a new plot without passing a filename argument, it will write over whatever plot has the name "plot from API". I think we need to get rid of the default plot name now that fileopt is gone. |
Ahh, yeah, a grid shouldn't overwrite a plot. But what do you expect to happen when a grid is uploaded without a name? Should it be called "grid from API" or something? |
@jonmmease I edited my comment above to make it more clear that my issue is the default filename. Calling iplot without a specific filename (e.g I find this behaviour a little weird since I'm used to not having to name every plot I want to send to the cloud. |
What happens if we just provide no name at all? I thought Chart Studio handled adding the "(1)" or otherwise deduping names, no? |
Hmm, the file name "plot from API" was passed along before through the clientresp I believe. If we don't specify the name at all, we get names like That works for me, I'll do this in the next alpha. but let me know what you think |
@michaelbabyn ok, please try out |
@jonmmease , chart_studio version 1.0.0a5 works as I expect it to. I'll go ahead and close this issue. |
For context, I was curious to see how the new chart_studio package would handle the switch to using the v2 rest API so I did a little QA and ran into the below issue.
I get
PlotlyRequestError: Sorry, a file named 'plot from API' already exists
after trying to upload a second unnamed plot to plot.ly using chart-studio 1.0.0a2.Steps to reproduce:
The text was updated successfully, but these errors were encountered: