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

“syntaxerror: not a png file” error in dataframe_image library #87

Closed rasimsahin closed 1 year ago

rasimsahin commented 1 year ago

İ’m using Python 3.6.8, until chrome upgrade to new version I can use DFI to export styled dataframe to PNG. But after chrome upgrade , i have error like “syntaxerror: not a png file” . I've looked through the issues but couldn't find any solution. Anyone have any ideas for a definitive solution for this?

PaleNeutron commented 1 year ago

Please add a minimal script to repoduce it and tell me about your enviroment.

Madanraj-Delta commented 1 year ago

if the columns is greater than 8, facing this problem @PaleNeutron Please check..

Madanraj-Delta commented 1 year ago
import pandas as pd
import numpy as np

# create a wide dataframe with 10 columns
df = pd.DataFrame(np.random.randn(10, 10), columns=['col{}'.format(i) for i in range(10)])

# export the dataframe as png image using dfi
dfi.export(df, 'wide_df.png')
Madanraj-Delta commented 1 year ago

This is working on version 0.1.10 but having issue on version 0.1.11, the latest release is throwing the issue.

@PaleNeutron Please verify the release done on apr 23.

PaleNeutron commented 1 year ago

@Madanraj-Delta

image

I can not reproduce any syntaxerror.

Madanraj-Delta commented 1 year ago

now its behaving same way as you shared