Python dataframe_image results in SyntaxError: not a PNG file
In my case the following worked:

Update windows to the latest version
Update conda
Good day. I used to have a normally working code which exports styled dataframe as a PNG. For some reason now it doesn't work except for certain machines used by my fellow coworkers. I suspect iit is somehow relevant to the latest windows or Chrome updates but I am not sure.
Sample code:
import numpy as np
import pandas as pd
import dataframe_image as dfi
my_array = np.array([[11,22,33],[44,55,66]])
df = pd.DataFrame(my_array, columns = ['Column_A','Column_B','Column_C'])
df=df.style.set_properties(**{'background-color': 'black',
'color': 'white'})
display(df)
dfi.export(df, 'Test.png', table_conversion='chrome')
Received error:
Traceback (most recent call last):
File "C:\Users\Anato\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3457, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 13, in 
dfi.export(df, 'Test.png', table_conversion='chrome')
File "C:\Users\Anato\anaconda3\lib\site-packages\dataframe_image_pandas_accessor.py", line 24, in export
dpi=None
File "C:\Users\Anato\anaconda3\lib\site-packages\dataframe_image_pandas_accessor.py", line 73, in _export
File "C:\Users\Anato\anaconda3\lib\site-packages\dataframe_image_screenshot.py", line 167, in run
max_crop = int(img.shape[1] * 0.15)
File "", line 40, in take_screenshot_override
img = mimage.imread(buffer)
File "C:\Users\Anato\anaconda3\lib\site-packages\matplotlib\image.py", line 1541, in imread
with img_open(fname) as image:
File "C:\Users\Anato\anaconda3\lib\site-packages\PIL\ImageFile.py", line 121, in init
self._open()
File "C:\Users\Anato\anaconda3\lib\site-packages\PIL\PngImagePlugin.py", line 677, in _open
raise SyntaxError("not a PNG file")
File "", line unknown
SyntaxError: not a PNG file
Searched the web and found no answer that could help. Tried udating packages and python itself. I believe it has to do with latest system updates but found no solution for over a week.