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

Fileinput widget always returns None for name of uploaded file #955

Closed
ltalirz opened this issue Jan 17, 2020 · 1 comment · Fixed by #956
Closed

Fileinput widget always returns None for name of uploaded file #955

ltalirz opened this issue Jan 17, 2020 · 1 comment · Fixed by #956
Milestone

Comments

@ltalirz
Copy link
Contributor

ltalirz commented Jan 17, 2020

As of panel 0.7.0 (with bokeh 1.4.0), the Fileinput widget does not set the name of the uploaded file.

E.g. in the following code

import panel as pn

inp = pn.widgets.FileInput(name='Upload')
btn = pn.widgets.Button(name='Upload', button_type='primary')
r= pn.Column(pn.Row(inp, btn),)

def on_click_parse(event):
    #print(inp.get_param_values())
    print(inp.filename)
btn.on_click(on_click_parse)

r.servable()

it always prints None to the terminal.

I can already see where the issue is and will open a PR.

@ltalirz
Copy link
Contributor Author

ltalirz commented Jan 17, 2020

Looking at the code from 0.6.2 that was reported to be working fine on SO, it seems to be unchanged in 0.7.
https://github.com/holoviz/panel/blob/v0.6.2/panel/widgets/input.py#L55

I.e. perhaps this was a change that crept in via a bokeh update?

@philippjfr philippjfr added this to the v0.8.0 milestone Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants