It appears that in the line
info = extract_info(imgs, important_datalabels=important_datalabels),
imgs is a typo, and should instead be
Why this gives you the specific error mode you are seeing depends on what
imgs is. The variable
imgs must be defined somewhere in your notebook, otherwise your code would raise a NameError.
imgs is probably a list or iterator containing some kind of object that
Image.open() doesn’t expect; this would cause it to fail when it tries to use the object’s
CLICK HERE to find out more related problems solutions.