KoushikNavuluri/Claude-API

{'Error: Invalid file format. Please try again.'} upload_attachment return False

roaringmyshallowwater opened this issue · 2 comments

All the other steps went well, but I found that the site or the function upload_attachment didn't seem to work.
If I post a pdf document, output {'Error: Invalid file format. Please try again.'}
I assume the source of the error is that upload_attachment returns False.

        response = req.post(url, headers=headers, proxies=self.proxies,files=files)
        if response.status_code == 200:
            return response.json()
        else:
            return False

Note: proxies have been set up by me in order to be able to access them successfully

All the other steps went well, but I found that the site or the function upload_attachment didn't seem to work. If I post a pdf document, output {'Error: Invalid file format. Please try again.'} I assume the source of the error is that upload_attachment returns False.

        response = req.post(url, headers=headers, proxies=self.proxies,files=files)
        if response.status_code == 200:
            return response.json()
        else:
            return False

Note: proxies have been set up by me in order to be able to access them successfully

Maybe it has no text to be extract

Randomboiii03

Thanks for comment. I tried several examples and i am sure that there has text to be extracted. I'm still looking for a solution