dexplo / dataframe_image

A python package for embedding pandas DataFrames as images into pdf and markdown documents
https://dexplo.org/dataframe_image
MIT License
282 stars 41 forks source link

[BUGFIX]: screenshot: Avoid holding the image resource. #70

Closed ItamarShalev closed 1 year ago

ItamarShalev commented 1 year ago

Since the is image already opened by the screenshot function, chrome can't write to that file and throw the exception, "Failed to write file The process cannot access the file because it is being used by another process."

Signed-off-by: Itamar Shalev itamar1111111@gmail.com

buckyster commented 1 year ago

Looks good to me.

It didn't makes sense to open temp_img for writing, when it's being written by a subprocess (Chrome). It seems like doing that blocked Chrome from writing to temp_img.