widgetti / widgetti/ipyvuetify
`FileUpload` makes the Kernel die on `file_obj` read with (ipykernel > 6.29)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 355
- Forks
- 61
- PR merge metrics
- No merged PRs in 30d
Description
Description
When using the FileInput widget from ipyvuetify.extra, file uploads work as expected with ipykernel versions below 6.30. However, with ipykernel 6.30 and above, the widget no longer responds to file uploads and crashes the kernel.
Minimal example:
from ipyvuetify.extra import FileInput
def on_file_input_change(change):
files = fi.get_files()
for file in files:
file["file_obj"].seek(0)
file["file_obj"].read()
fi = FileInput()
fi.observe(on_file_input_change, names="file_info")
fi
Steps to reproduce:
Install ipykernel<6.30 and run the code above – file uploads work.
Upgrade to ipykernel>=6.30 and run the same code – file uploads work up to the read step and then kernel crashes.
Expected behavior: File uploads should work with newer versions of ipykernel.
Environment:
OS: Windows
ipyvuetify version: 1.11.3
ipykernel version: 6.30+ (broken), 6.29.5 (works)
Jupyter environment: [e.g., JupyterLab, VS Code, etc.]
Note
I also tested with ipykernel==7.0.0a1 and the kernel does not crash but the code fails differently:
AttributeError: 'IPythonKernel' object has no attribute 'msg_queue'
- Maybe also relevant for #288
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the minimal FileInput example with ipykernel 6.29.5 and 6.30+, focusing on get_files() and the file_obj read in the change callback. Inspect the FileInput implementation and the related context in #288 for ipykernel compatibility. Done means file uploads can be read without crashing the kernel on supported newer versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter, python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100