Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
roaringmyshallowwater opened this issue Nov 17, 2023 · 2 comments

Comments

@roaringmyshallowwater
Copy link

roaringmyshallowwater commented Nov 17, 2023

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

@Randomboiii03
Copy link

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

@roaringmyshallowwater
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants