Я использую dataframe_image, и у меня есть сообщение об ошибке, пытаясь экспортировать DataFrame.
Более того вчера все было хорошо, и моя программа работала, но сегодня (без каких -либо изменений в код), я получаю это Сообщение об ошибке при попытке выполнить это: < /p>
import pandas as pd
import dataframe_image as dfi
from pptx import Presentation
from pptx.util import Inches
df = pd.DataFrame({
"Fonds": ["Fonds A", "Fonds B", "Fonds C"],
"Performance": [5.4, -2.1, 3.7],
"Volatilité": [12.3, 15.2, 9.8],
})
styled_df = df.style.format("{:.2f}", subset=["Performance", "Volatilité"])
png_file = "tableau_styled.png"
dfi.export(styled_df, png_file)
print(f"Image générée : {png_file}")
ppt_file = "exemple_dataframe_image.pptx"
prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[5])
left = Inches(1) # marge à gauche
top = Inches(1) # marge en haut
width = Inches(6) # largeur de l'image
# Ajouter l'image sur la diapositive
slide.shapes.add_picture(png_file, left, top, width=width)
# Sauvegarder la présentation
prs.save(ppt_file)
print(f"Présentation PowerPoint créée : {ppt_file}")
< /code>
CalledProcessError: Command '['--enable-logging', '--disable-gpu', '--headless=old', '--crash-dumps-dir=C:\\Users\\JacquesTebeka\\.dataframe_image\\tmpxx3ajl9q', '--force-device-scale-factor=1', '--window-size=1400,900', '--hide-scrollbars', '--screenshot=C:\\Users\\JacquesTebeka\\.dataframe_image\\tmpxx3ajl9q\\temp.png', 'C:\\Users\\JacquesTebeka\\.dataframe_image\\tmpxx3ajl9q\\temp.html']' returned non-zero exit status 1.
Подробнее здесь: https://stackoverflow.com/questions/793 ... -dataframe