iPyWidgets FileUpload not working as I expect it

Viewed 754

Im currently trying to load a file in my jupyter notebook, to read it's content.

My Code:

file = widgets.FileUpload(
    description= 'Title',
    accept='.csv',
    multiple=False,
)
box = widgets.HBox([file])
display(box)

# New Cell

print(str(file))

I run the first cell, after that i use the FileUploader to Upload a .csv File before running the second cell. I expect the output to be a dict containing the files Context like "content" etc.

A Screenshot of a simpler version:

enter image description here

Does anyone know that i'm doing wrong? I also tried every other idea that came to my mind.

1 Answers
Related