Open leungdunn opened 2 months ago
Got the same issue, any help is appreciated @gventuri
Does it work if you remove the save_charts_path
? Did you check whether the folder actually exists and is created?
Does it work if you remove the
save_charts_path
? Did you check whether the folder actually exists and is created?
I did recreate @leungdunn 's code to try and fix the error on my side, and I can say that the issue persists with or without specifying save_charts_path.
The weird thing is that the directory or folder itself is created (exports/charts/), but the png file for the chart output itself is not created.
@leungdunn try to set open_charts to True, this will create the plot png file, which can then be accessed via the returned path.
Note that turning it to True also opens the file automatically.
Also try setting save_charts to True, this should create the plot and save it without opening it (Although this creates some unexpected behaviour, @gventuri check issue #1175)
The issue is because the original "save as png" prompt could be omitted by GPT3.5 or BambooLLM. Switching to GPT4 API would eliminate the issue.
Raised a PR https://github.com/Sinaptik-AI/pandas-ai/pull/1214 to fix this issue.
System Info
OS version: macOS Sonoma 14.4.1 Python version: 3.10.12 pandasai version: 2.0.28
🐛 Describe the bug
It cannot go through when using the Agent to plot pictures. It is okay if the question response is supposed to be text.
Below is my code:
full traceback is as below