hi, i just started going through lesson-1 of fast.ai part1-v2, in google-colab. Asi was going through line by line along with the lecture video i was stuck when i came to these lines of code
I also spent the few hours searching, for the cause. I think now that I have found the issue. There is actually no function with the name register_extensions() but register_extension(). I have created the PR on the official GitHub Repository. Let’s hope for the best.
I think it is the cause of the error.
The error I am getting is AttributeError: module 'PIL.Image' has no attribute 'register_extensions'
There are others also who are facing the same issue
Well it turns out that the code for which I created the PR is indeed correct. Please see the PR for further info.
@kelawaad I have used the above lines with PIL.Image even then I am getting the same error.
I saw these lines while importing, torchvision is installing the Pillow 5.0.0 so whats the use of first line.
I also ran into this issue while using colab.
I think the problem is that Pillow==4.0.0 is preinstalled on colab and when you upgrade the package or install packages that require a newer version (5.0.0 in my case) there can be a mismatch between the api of the two versions.
For me restarting the runtime using “Runtime / Restart runtime…” from the menu after installing the newer Pillow using pip and running the code that uses it fixed the issue.
I’ve been trying different workarounds and even used some of the member’s helpful comments here, but I am still getting this error. I’ve also managed to “break” some other things, but I’m sure I can fix those with a fresh instance. Any and all help debugging is greatly appreciated.