I am having trouble inserting a table into a dashboard. I am able to insert the table manually in the web interface, but not programmatically. I suspect that I am not specifying the âboxTypeâ correctly, but I have tried âplotâ,âtextâ and âtableâ to the same result.
Any help would be appreciated.
::::::CODE:::::
Using the fileId_from_url function from the documentation:
fileId_1 = fileId_from_url(url_1)
box_a={
âtypeâ: âboxâ,
âboxTypeâ: âplotâ,
âtextâ: fileId_1,
âtitleâ: ââ
}
my_dboard.insert(box_a)
py.dashboard_ops.upload(my_dboard, page_id)
PlotlyRequestError Traceback (most recent call last)
in ()
64
65
â> 66 py.dashboard_ops.upload(my_dboard, page_id)
C:\ProgramData\Anaconda3\envs\social\lib\site-packages\plotly\plotly\plotly.pyc in upload(cls, dashboard, filename, sharing, auto_open)
1468
1469 except exceptions.PlotlyRequestError:
-> 1470 res = v2.dashboards.create(data)
1471 res.raise_for_status()
1472
C:\ProgramData\Anaconda3\envs\social\lib\site-packages\plotly\api\v2\dashboards.pyc in create(body)
15 âââCreate a dashboard.â""
16 url = build_url(RESOURCE)
â> 17 return request(âpostâ, url, json=body)
18
19
C:\ProgramData\Anaconda3\envs\social\lib\site-packages\plotly\api\v2\utils.pyc in request(method, url, **kwargs)
151 content = response.content if response else 'No contentâ
152 raise exceptions.PlotlyRequestError(message, status_code, content)
â> 153 validate_response(response)
154 return response
C:\ProgramData\Anaconda3\envs\social\lib\site-packages\plotly\api\v2\utils.pyc in validate_response(response)
77 message = content if content else 'No Contentâ
78
â> 79 raise exceptions.PlotlyRequestError(message, status_code, content)
80
81
PlotlyRequestError: {uâdirectionâ: uâverticalâ, uâsizeUnitâ: uâpxâ, uâsecondâ: {uâtypeâ: uâboxâ, uâboxTypeâ: uâemptyâ}, uâsizeâ: 750, uâtypeâ: uâsplitâ, uâfirstâ: {uâtypeâ: uâboxâ, uâtextâ: uâharbinger.ai:53â, uâboxTypeâ: uâtableâ, uâtitleâ: uââ}} is not valid under any of the given schemas
Failed validating âoneOfâ in schema[âpropertiesâ][âlayoutâ]:
{âoneOfâ: [{âtypeâ: ânullâ}, {â$refâ: â#/definitions/containerâ}]}
On instance[âlayoutâ]:
{uâdirectionâ: uâverticalâ,
uâfirstâ: {uâboxTypeâ: uâtableâ,
uâtextâ: uâharbinger.ai:53â,
uâtitleâ: uââ,
uâtypeâ: uâboxâ},
uâsecondâ: {uâboxTypeâ: uâemptyâ, uâtypeâ: uâboxâ},
uâsizeâ: 750,
uâsizeUnitâ: uâpxâ,
uâtypeâ: uâsplitâ}