For those that setup on their own Linux box I recently upgraded mine to Ubuntu 22.04.1 and ran into an issue using FileUpload where the error message was FileUpload(): object has no attribute 'data'. I believe this might be due to an updated version of ipywidgets, but am/was unsure.
A workaround I used, tested with lessons 01_intro.ipynb and 02_production.ipynb, replaces any line similar to the following:
img = PILImage.create(uploader.data[0])
with:
img = PILImage.create(uploader.value[0].content.tobytes())
It seems that FileUpload switched from returning data type to a new type called value, which is also reflected in the ipywidgets FileUpload documentation.
I searched the forums and it didn’t seem that anybody else has run into this problem (yet), which may mean it’s a specific problem with my own environment or setup. I used the vanilla pip install fastai command listed on the welcome page of the fast.ai docs page as my setup.