79787218

Date: 2025-10-10 10:07:43
Score: 2
Natty:
Report link

I tested the patch proposed for openpyxl ver 3.1.5 at https://foss.heptapod.net/openpyxl/openpyxl/-/issues?sort=created_date&state=opened&search=ValueError%3A+I%2FO+operation+on+closed+file.&first_page_size=20&show=eyJpaWQiOiIyMjc5IiwiZnVsbF9wYXRoIjoib3BlbnB5eGwvb3BlbnB5eGwiLCJpZCI6MjA3ODQ4fQ%3D%3D

The patch does NOT comment the closing file pointer in openpyxl\dawing\image.py , but organize in a different way the if statement (maybe it was a formatting error ?)

I tested both the version with commenting the #fp.close() , and the version in the proposed patch.
Both seems to work...
Maybe better to keep the proposed patch, because of possible too many files open error due to many fp opened if your are dealing with maaaany images...

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Giuliano69