I've been using dataframe_image for a while and have had great results so far. Last week, out of a sudden, all my code containing the method dfi.export() stopped working with this error as an output
raise SyntaxError("not a PNG file")
File <string>
SyntaxError: not a PNG file
I can export the images passing the argument table_conversion='matplotlib'
but they do not come out styled...
This is my code:
now = str(datetime.now())
filename = ("Extracciones-" now[0:10] ".png")
df_styled = DATAFINAL.reset_index(drop=True).style.apply(highlight_rows, axis=1)
dfi.export(df_styled, filename,max_rows=-1)
IMAGEN = Image.open(filename)
IMAGEN.show()
Any clues on why this just suddenly stopped working? Or any ideas to export dataframes as images (not using html)?
These were the outputs i used to get: fully styled dataframe images
and this is the only thing I can get right now
Thank you in advance
CodePudding user response:
I had the same issue, and we finally figured it out; looks like the new release of dataframe_image on 1/14 broke something on the previous version. We upgraded the package and the issue was resolved.
pip install -u dataframe_image