FileUpload ipywidget returns empty dict
See original GitHub issueEnvironment data
- VS Code version: 1.61.2
- Jupyter Extension version (available under the Extensions sidebar): v2021.9.1101343141
- Python Extension version (available under the Extensions sidebar): v2021.10.1365161279
- OS (Windows | Mac | Linux distro) and version: Ubuntu 20.04.3 LTS
- Python and/or Anaconda version: Python 3.8.10
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): virtualenv
- Jupyter server running: Local
Expected behaviour
After choosing a file to upload the next ran cell should return the uploaded file.
Actual behaviour
The upload widget still returns an empty dict after the upload.
Steps to reproduce:
import ipywidgets as widgets
uploader = widgets.FileUpload()
uploader.value.values()
returns: dict_values([])
display(uploader)
returns: visual uploader button action: choose file and upload
uploader.value.values()
returns: dict_values([]) expected return: dict_values([{‘metadata’: {‘name’: '…}}])
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:11 (4 by maintainers)
Top Results From Across the Web
widgets.FileUpload() not working - Part 1 (2020)
FileUpload() uploader Result is : “FileUpload(value={}, description='Upload')” I have ... FileUpload ipywidget returns empty dict #8084 ...
Read more >iPyWidgets FileUpload not working as I expect it
I run the first cell, after that i use the FileUploader to Upload a .csv File before running the second cell. I expect...
Read more >ipywidgets changelog — Jupyter Widgets 7.7.2 documentation
#2333; New FileUpload widget allowing users to upload files from the browser. ... method returning a dictionary instead of a default dictionary attribute....
Read more >Python-Data Projects — Data Analysis UI Reinforced by ...
In this post, we will be constructing an ipywidget framework that: retrieves source data (in CSV format) and parses the content,; supplements ...
Read more >ipywidgets Documentation - Read the Docs
Note that a dropdown is used if a list or a dict is given (signifying ... Unlike interact, interactive returns a Widget instance...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Having the same problem here, it doesn’t work in vscode but it works in Jupyter notebook classic.
https://github.com/jupyter-widgets/ipywidgets/issues/2522#issuecomment-516434947
This is where I got the information from