Assistants API v2 using code interpreter can't find uploaded files

Since yesterday I’m trying to use uploaded files via code interpreter, but can’t get it to work with assistants API v2.

I adhere to the docs:

with open(tmp_file_path, "rb") as file:
                    uploaded_file = client.files.create(file=file, purpose="assistants")
                            "tools": [{"type": "code_interpreter"}],

attachments is later added to the assistants message.

The file is shown as successfully uploaded in the UI:


The assistant can correctly use tools like duckduckgo, custom tools, and I can download files created via code interpreter.

But when I upload a file and ask something about it, I always receive something along these lines as an answer: I can't find the file with this path

Is anybody else able to upload files to code interpreter using the v2 api?

OS: Ubuntu
OpenAI python SDK version: openai-1.30.4

Known bug for weeks now. Still waiting for an update on when it will be fixed.

1 Like

thank you for the answer!

Just so that I won’t open a ticket again for known stuff, could you let me know where you know this from?

I was actually checking this forum, github issues as well as discord but couldn’t find this exact bug.

I’ve had email discussions back and forth with one of the engineers, so I know they’re on it, I just figure it’s a lot more complicated to fix than they originally thought.

You can check my posts, I’ve been asking about it for weeks now, so there are a couple of them.

1 Like