Code Interpreter run error while generating Pie Chart

SUSHANT NAIR 75 Reputation points
2025-07-09T06:26:14.84+00:00

Hi,

I have a project on Microsoft Azure AI Foundry. When I try to run an agent with code interpreter, by asking questions which require fetching textual content from the uploaded excel file, it works properly. However, when I ask it to generate an image, like a pie chart, for the insights, then it throws this error:

Error server_error: Sorry, something went wrong. RunId: run_DbmZJKi3kG9k4E0LN8qQkX1j when running microsoft azure ai foundry agent with code interpreter

This error started coming only at the day of posting, and not before. Can I know why this error is happening?

Thanks.

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Alex Burlachenko 18,575 Reputation points Volunteer Moderator
    2025-07-09T09:44:21.0533333+00:00

    SUSHANT hi,

    thanks for posting this on q&a, its super helpful when folks share their exact issues like u did. this server error might pop up if the code interpreter hits a snag with image generation permissions. check if the agent's role has 'allow data visualization' enabled in its settings. sometimes updates reset these things, ugh.

    also, try a smaller dataset first. if the excel file is huge, the code interpreter might choke while rendering visuals. split the data or sample a chunk, then test again. this might help in other tools too, honestly.

    as well make sure the 'microsoft azure ai foundry python sdk' is updated. that runid suggests a backend hiccup, and outdated libs love causing those. run pip install --upgrade azure-ai-foundry and cross ur fingers :))

    log the full error next time (if u can safely share it). server errors like this love hiding clues in the details. oh, and if u're using custom python libs for charts, stick to basic 'matplotlib' for now - less drama...

    clear the agent's cache. sounds simple, but 60% of the time, it works every time ) just restart the session or redeploy the agent.

    let us know if the pie chart gods smile upon u after this...

    Best regards,

    Alex

    and "yes" if you would follow me at Q&A - personaly thx.
    P.S. If my answer help to you, please Accept my answer
    

    https://ctrlaltdel.blog/


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.