Skip to content
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

Tabulator with Empty DataFrame Ajax Error #2157

Closed
HugoMichi opened this issue Apr 9, 2021 · 1 comment · Fixed by #2161
Closed

Tabulator with Empty DataFrame Ajax Error #2157

HugoMichi opened this issue Apr 9, 2021 · 1 comment · Fixed by #2161
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@HugoMichi
Copy link

Then using the Tabulator widget with an empty DataFrame, an error is displayed, that seems to be related with Ajax.
As far as I can tell, Tabulator tries to get data from ajax if none is provided and if AjaxURL is set.
A solution to fix this could be to not set AjaxURL in

ajaxURL: "http://panel.pyviz.org",

ALL software version info

panel 0.11.0

Description of expected behavior and the observed behavior

I dont expect an error when displaying an empty table

Complete, minimal, self-contained example code that reproduces the issue

import pandas as pd
import panel as pn

table = pn.widgets.Tabulator(pd.DataFrame(columns=['foo','bar']))
pn.panel(table).show()

Stack traceback and/or browser JavaScript console output

Access to fetch at 'http://panel.pyviz.org/' from origin 'http://localhost:59931' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
panel.pyviz.org/:1 Failed to load resource: net::ERR_FAILED
tabulator.js:13150 Ajax Load Error - Connection Error: TypeError: Failed to fetch
tabulator.js:12988 Ajax Load Error: TypeError: Failed to fetch


Screenshots or screencasts of the bug in action

image

@philippjfr
Copy link
Member

Thanks! It should definitely never actually make the request, it's only specified because otherwise it errors immediatately.

@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Apr 9, 2021
@philippjfr philippjfr added this to the v0.11.2 milestone Apr 9, 2021
@philippjfr philippjfr modified the milestones: v0.11.2, v0.11.3 Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants