Anyone else getting 'File cannot be opened' issues when attaching a .txt file to messages via API?

I’m attaching a simple txt file to a message via

thread = openai.beta.threads.create(
messages = [
{“role”: “user”, “content”: msg, “file_ids”: [“file-myId”]}

Then when running, along with a prompt the response comes back as something like “It seems that there was an issue opening the file. Let me try to open it again.” - or a variation of.
In the original prompt that gets rendered, the file_id evaluates to the actual filename I uploaded, indicating the the file was indeed uploaded successfully and is being found correctly. Just wondering if anyone else faced the same issue?

I’m having the same issue. Did you try another file format?

I keep getting this error: When trying to add a .xlsx file - invalid format we only accept .xlsx among other things.

I can convert it to PDF and upload but that makes CI pretty useless - any thoughts??

There was an error uploading the file SRO Financial Report 11-07-2023.xlsx: Invalid file format. Supported formats: [‘c’, ‘cpp’, ‘csv’, ‘docx’, ‘html’, ‘java’, ‘json’, ‘md’, ‘pdf’, ‘php’, ‘pptx’, ‘py’, ‘rb’, ‘tex’, ‘txt’, ‘css’, ‘jpeg’, ‘jpg’, ‘js’, ‘gif’, ‘png’, ‘tar’, ‘ts’, ‘xlsx’, ‘xml’, ‘zip’]

1 Like