AttributeError: module 'PIL.Image' has no attribute 'register_extensions'


(Shubhajit Das) #1

When I am running this cell:

img = plt.imread(f'{PATH}valid/cats/{files[0]}')
plt.imshow(img);

got the error:
AttributeError: module 'PIL.Image' has no attribute 'register_extensions'


(Jeremy Howard (Admin)) #2

Please take a look here so that we can be helpful: How to ask for help


(Shubhajit Das) #3

Thank you for that. But I can’t identify what’s wrong with the code


(Jeremy Howard (Admin)) #4

I understand that. But if you don’t follow the instructions in that link no one will be able to help you.