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

FileUpload ipywidget returns empty dict #8084

Closed
vidsaat opened this issue Oct 28, 2021 · 13 comments
Closed

FileUpload ipywidget returns empty dict #8084

vidsaat opened this issue Oct 28, 2021 · 13 comments
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster ipywidgets Rendering, loading, saving, anything to do with IPyWidgets

Comments

@vidsaat
Copy link

vidsaat commented Oct 28, 2021

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': '.........}}])

@vidsaat vidsaat added the bug Issue identified by VS Code Team member as probable bug label Oct 28, 2021
@IanMatthewHuff
Copy link
Member

@vidsaat Thanks for the detailed report. I repro the same thing, and that the same code does work correctly in Jupyter notebook classic:
image

@IanMatthewHuff IanMatthewHuff removed their assignment Oct 28, 2021
@greazer greazer added ipywidgets Rendering, loading, saving, anything to do with IPyWidgets and removed needs-triage labels Oct 28, 2021
@matifrancois
Copy link

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

@dd-rrc-ps
Copy link

Same problem here. It should be greate if VScode support this function

@JosephAntony1
Copy link

Any luck on this?

@DonJayamanne
Copy link
Contributor

@matifrancois @dd-rrc-ps @JosephAntony1
I've tested this at my end and it seems to work as expected. Please could you test this again and let me know if it works or not.

@DonJayamanne DonJayamanne added the info-needed Issue requires more information from poster label Jun 17, 2022
@JosephAntony1
Copy link

It worked for me once I started changing the jupyrer config kernel size from 10mb to something more like 1gb

@DonJayamanne
Copy link
Contributor

config kernel size from 10mb to something more like 1gb

Please could you let me know what that setting is.
Thanks

@JosephAntony1
Copy link

jupyter-widgets/ipywidgets#2522 (comment)

This is where I got the information from

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Jun 17, 2022

Thanks, going to close this issue as fixed.

Solution

ensure to increase the max message size as mentioned here jupyter-widgets/ipywidgets#2522 (comment)

c.NotebookApp.tornado_settings = {"websocket_max_message_size": 100 * 1024 * 1024}

@datalifenyc
Copy link

Thanks, going to close this issue as fixed.

Solution

ensure to increase the max message size as mentioned here jupyter-widgets/ipywidgets#2522 (comment)

c.NotebookApp.tornado_settings = {"websocket_max_message_size": 100 * 1024 * 1024}

How do you point Visual Studio Code to the jupyter_notebook_config.py or jupyter_notebook_config.json file?

@ubalklen
Copy link

@datalifenyc have you figured out? I have the same question.
Also summoning master wizard @JosephAntony1 to check if he can help us :-)

@epicwhale
Copy link

Has anyone figured how do you change that websocket_max_message_size for the VS Code Python kernel I am using here? I am confused how to link up the jupyter notebook config with VS code too...

@wrogner
Copy link

wrogner commented May 7, 2023

Wow, 555 days since this issue was reported.

Cudos to MS for taking so much time and effort to produce a working and stable product (stable it is).

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster ipywidgets Rendering, loading, saving, anything to do with IPyWidgets
Projects
None yet
Development

No branches or pull requests