diff --git a/apps/utils/export.py b/apps/utils/export.py index d9a4a0f0..0fdfaa0b 100644 --- a/apps/utils/export.py +++ b/apps/utils/export.py @@ -142,9 +142,12 @@ def export_excel_img(field_data: list, data: list, FileName: str): cell = ws.cell(column=i2+1, row=i1+2) if v2 and field_data[i2]['type'] == 'img': ws.row_dimensions[i1+2].height = 70 - img = Image(settings.BASE_DIR + v2) - img.width, img.height = (90, 90) - imgs.append((img, field_data[i2]['letter'] + str(i1+2))) + try: + img = Image(settings.BASE_DIR + v2) + img.width, img.height = (90, 90) + imgs.append((img, field_data[i2]['letter'] + str(i1+2))) + except: # 这里先不做处理 + pass else: cell.value = v2