Issue Downloading PPTX File Created Using Python Code in ChatGPT: "The code interpreter tool session has expired."

I used the ChatGPT model with the code interpreter tool to generate a PowerPoint presentation (PPTX). The Python code successfully created the file, but when I attempted to download it, I received the following error message:

Error: “The code interpreter tool session has expired.”

Here are the steps I followed:

  1. I wrote Python code to generate a PowerPoint presentation using the pptx library.
  2. The PPTX file was saved in the /mnt/data/ directory.
  3. When I clicked the link to download the generated file, the error message appeared.

Error Message:

When I try to download the generated file, I receive the following error message: “The code interpreter tool session has expired.”

Request for Help:

Can someone help me understand why I am receiving this error and how to resolve it? I need to be able to download the generated PPTX file without encountering this issue. Any suggestions or solutions would be greatly appreciated.

1 Like

Hi and welcome to the Forum!

This sounds like it might have been a one-off issue. I just gave it a try on my end and it was fine. Did you wait particularly long until you attempted to download it?

There may a time limit for how long files remain available for download. For example in the Assistant’s API code interpreter sessions are active for one hour. A similar limit might apply when using code interpreter in ChatGPT.

1 Like

The reason you are getting this error is probably because you have switched to different tabs. Some Chrome-like browsers “freeze” the tab after switching tabs to save data, which may cause aPI to not work correctly. I’ve had a similar problem in different cases, I haven’t had this since I kept an active tab and switched it off in settings :four_leaf_clover:

I am getting this constantly with csv files I asked to create. I never leave the tab and I tried several times of couple of days and I keep getting session expired, even if I immediately click the link.
In fact, I experience a lot of failures in analysis lately where GPT code cannot be executed for some reason

Try closing the browser completely and reopening, then trying to access the files again. Sometimes I have to do that to access previous chats, files, or images.

2 Likes