Claude-API icon indicating copy to clipboard operation
Claude-API copied to clipboard

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

Open rosa-lie opened this issue 2 years ago • 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

rosa-lie avatar Nov 17 '23 14:11 rosa-lie

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 avatar Nov 19 '23 06:11 Randomboiii03

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

rosa-lie avatar Nov 20 '23 07:11 rosa-lie