'ValueError: Cell k2 doesn't contain an image
I am stuck with this python code regarding SheetImageLoader
. The error message says that there's no image in the cell I am referencing, but there's an image in that cell.
from openpyxl_image_loader import SheetImageLoader
import openpyxl
#ADD PICTURE TO PICBOX(TOPLEVEL)
def pic_upload():
excel_path = ('DData.xlsx')
file =openpyxl.load_workbook(excel_path)
sheet=file['Sheet1']
image_loader = SheetImageLoader(sheet)
picget = image_loader.get('k2')
picget.show
This is the error I'm getting:
raise ValueError("Cell {} doesn't contain an image".format(cell))
ValueError: Cell k2 doesn't contain an image
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|