I tried to copy the first example code in the plotly documentation for creating tables and ran it .Yet I see an error. I am very new to programming and plotly. Kindly look into it and suggest remedies.
Could have something to do with plotly.py 4.0.0 update, but your screenshot isn’t too helpful since the stack trace is cutoff. Could you copy paste the traceback error in plain text?
I also looked it up online. you are right. It seems like an update issue.I will link the page. Please help further.
I got a similar error message the next time.
Can you copy your traceback error in plain text?
Is this what you are asking for?
PlotlyError: Because you didn’t supply a ‘file_id’ in the call, we’re assuming you’re trying to snag a figure from a url. You supplied the url, ‘’, we expected it to start with ‘https://plot.ly’.
Run help on this function for more information.
"The ‘file_id’ argument was not able to be converted into an "
"integer number. Make sure that the positional ‘file_id’ argument "
"is a number that can be converted into an integer or a string "
“that can be converted into an integer.”
Is this what you are asking for?
No, I was referring to the error message that starts and ends with “AttributeError”, it was in your first screenshot.
I was able to recreate that table in the documentation using plotly 4.0.0
and I didn’t get any AttributeError. I did tweak it a bit though by using the plotly offline mode, but I don’t see how that would have much to do with it. That said, without a full traceback error, I can’t really provide much more help.
import plotly.offline as py
import plotly.figure_factory as ff
data_matrix = [['Country', 'Year', 'Population'],
['United States', 2000, 282200000],
['Canada', 2000, 27790000],
['United States', 2005, 295500000],
['Canada', 2005, 32310000],
['United States', 2010, 309000000],
['Canada', 2010, 34000000]]
table = ff.create_table(data_matrix)
py.plot(table, filename='simple_table')
Thankyou for your response. I tried this and got the table in offline mode.But coming back to the previous error when I ran the code for the second time I got a different error. The plotly.plotly is deprecated and the suggestion was to use chart_studio.plotly.I did that and there was no error. But I didnt get a table either. My purpose of creating a table is to display it in the dash app.Attaching the screenshot for reference.
In that case, you don’t need to use plotly’s plot function. You should read the dash documentation though.
Also, iplot is only for use in Jupiter notebook.
ok. I am using Dash’s DataTable to create a table. Thank you
The issue I am facing now is, I have a data frame of about 58 rows. I want to display each row of it on the dash app based on the values selected in the drop down. This value corresponds to the row index and I slice it, convert the series into a data frame and then When I attempt to pass it on, I am stuck with not knowing what exactly should be the property of the output. I tried using ‘data’ as a property in dash dependencies.Output and sent the data.But the error tells that, there is no key as such. What should be the property instead? I am using Dashtable’s DataTable.