question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FileUpload ipywidget returns empty dict

See original GitHub issue

Environment 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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
matifrancoiscommented, Nov 28, 2021

Having the same problem here, it doesn’t work in vscode but it works in Jupyter notebook classic.

1reaction
JosephAntony1commented, Jun 17, 2022
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found