ChatGPT not being able to analyze text files

I regularly run into problems with chatgpt not being able to analyze files for some reason. E.g. It will say something like

" It appears we’re still facing issues accessing the stack.yaml and package.yaml files directly for content extraction. Given this limitation, I’m unable to directly analyze the contents of these files as requested."

Sometimes renaming files to be .txt helps. Other times it still has problems even after changing the extension. The problem seems to be inconsistent in that it sometimes can read a very similar file perfectly without even changing the extension to .txt. Other times it will keep refusing the read these files. How can I work around this?

(To be clear the file will show as successfully uploaded it just can’t be analyzed for some reason.)