AttributeError: module 'PIL.TiffTags' has no attribute 'IFD' PS: i`m using google colab

146 views Asked by At

here is the part of my code

import PIL
import numpy as np

ramp = "$@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\|()1{}[]?-_+~<>i!lI;:,^`'."
def average(image):
    im = np.array(image)

    return np.average(im.flatten())

def convert(path, imgScale, fontScale):
    if imgScale>1:
        raise Exception('isnt right scale')
    image = Image.open(path).convert("L")

    W, H = image.size

I used to watch for any solutions. People say it is because of pil version. But i have the last one(https://i.stack.imgur.com/04mlK.png)

1

There are 1 answers

0
Chandan Gupta On

google Colab will ask you to "restart runtime" after installation. You should click "restart runtime"