Cant delete assistant files after deleting assistant

I cant delete an assistants file from the normal

client.files.retrieve('file-ogYYFc3EHBSbSqE3EgjLq7iW')

output:
FileObject(id=‘file-ogYYFc3EHBSbSqE3EgjLq7iW’, bytes=395850, created_at=1699352854, filename=‘EU2320735_20230302_XS2566031444_Decentia-USD-COBA Memory-48M-.RUT+.STOXX-Final.pdf’, object=‘file’, purpose=‘assistants’, status=‘processed’, status_details=None)

client.files.delete('file-ogYYFc3EHBSbSqE3EgjLq7iW')

error:
NotFoundError: Error code: 404 - {‘error’: {‘message’: ‘No such File object: file-ogYYFc3EHBSbSqE3EgjLq7iW’, ‘type’: ‘invalid_request_error’, ‘param’: ‘id’, ‘code’: None}}

Its with purpouse: assistants

so in therory i should delete it like this:

client.beta.assistants.files.delete(
    assistant_id="...",
    file_id="file-ogYYFc3EHBSbSqE3EgjLq7iW"
)

but there is an error because i deleted the assistant before deleting its files.

3 Likes

I have the same “There was an error deleting the file: No such File object” error. However, I was unable to delete the files from the “Files Tab” (OpenAI Platform) even before deleting the Assistant (which I created in Playground). I therefore think this issue might not be specifically tied to whether the Assistant exists or not.

I uploaded two file formats for test them in the Assistant with RAG: .CSV and .HTML. For CSV, the Playground said that the format is unsupported (application/csv), but did not leave any objection to the HTML file.

2 Likes

It seems like they have fixed this issue, i have no problem deleting files anymore :slight_smile: .

2 Likes