Closed cwitkowitz closed 1 year ago
I didn't have any issue when loading sound(s) through each of the buttons. I'm wondering what could cause a difference. You mind sharing your Python version and package versions?
It seems the 8+ version of ipywidgets
stores the values associated to a file in a list
of dicts
and the version 7. in a dict
.
ipywidgets 7.6.5
:
class FileUpload(DescriptionWidget, ValueWidget, CoreWidget):
"""
Upload file(s) from browser to Python kernel as bytes
"""
[...]
error = Unicode(help='Error message').tag(sync=True)
value = Dict(read_only=True)
ipywidgets 8.0.4
class FileUpload(DescriptionWidget, ValueWidget, CoreWidget):
"""File upload widget
This creates a file upload input that allows the user to select
one or more files to upload. The file metadata and content
can be retrieved in the kernel.
Examples
--------
>>> import ipywidgets as widgets
>>> uploader = widgets.FileUpload()
# After displaying `uploader` and uploading a file:
>>> uploader.value
[
{
'name': 'example.txt',
'type': 'text/plain',
'size': 36,
'last_modified': datetime.datetime(2020, 1, 9, 15, 58, 43, 321000, tzinfo=datetime.timezone.utc),
'content': <memory at 0x10c1b37c8>
}
]
>>> uploader.value[0].content.tobytes()
b'This is the content of example.txt.\n'
I've specified the ipywidgets
version in requirements.txt
This is indeed fixed by installing ipywidgets==7.6.5
, however I don't see the referenced updates to requirements.txt
. I will close the issue after that update is made.
You may also consider adding jupyter
to requirements.txt
, as I needed to install it manually in order to run jupyter notebook
from the command line.
The requirements.txt were only update on the JOSS branch, I've merged this change on the main branch and added jupyter to requirements.txt.
I receive the following errors when attempting to load a sound file through each button of the GUI:
Single Sound
Dual Sounds
Multiple Sounds
Each results in a crash.