-
Notifications
You must be signed in to change notification settings - Fork 34
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
Discover API errors with unexpected keyword argument 'json' #17
Comments
I think that's because you're not seeing the |
you mean by adding something like: I just think there may be more flexible solutions that can conform to older versions and the newest version of requests. If clearbit is installed in a virtualenv where there was another package that required an older or specific version of requests (maybe for a terrible reason on their part) then they can all play together nicely. I don't have any concrete examples at the moment but I think I remember hitting an issue once upon a time where downgrading requests solved all errors. Sorry I don't have any good example will let you know if I actually find a better reason |
The content type is 'application/json' |
ahhh of course. yep that works my bad |
if I find the time I can work on a PR with suggested edits |
I tried running the example from the docs (and other queries as well to this endpoint)
and i get an error from requests library saying:
TypeError: request() got an unexpected keyword argument 'json'
clearbit package requirements are requests >= 0.8.8 and I am using requests==1.0.4 but the json parameter was added to requests in version 2.4.2. Upgrading the requirement version number would not be the right solution, I may suggest using the 'data' kwarg instead and encode the payload. But as a side note as well I noticed that this is making a POST while the docs have it as a GET...
When I tried to test this out though I still could not get a valid response but I may be doing something incorrect (same result when get is a post too)
This error that requests is throwing will happen for any of the other APIs that are using POST as well with an older requests version, but this was the first one I tested
The text was updated successfully, but these errors were encountered: