Closed modasserbillah closed 3 years ago
I never used the requests
version myself, but it seems to work, at least that's what the contributors that uploaded said and so far no complaints.
It looks like session.send()
doesn't return an object that supports https://docs.python.org/2.5/whatsnew/pep-343.html
A quick look at https://github.com/psf/requests/blob/master/requests/sessions.py and https://github.com/psf/requests/blob/master/requests/models.py#L644 seems that the model Response
is returned by Session.send()
and it does implement such protocol.
Maybe check your requests version? Or provide some information on what's the return of session.send()
?
@strazeadin do you know?
I noticed from the path in the error message that @modasserbillah is using Python 3.6
and this package Pipfile requires Python 3.7
so I'm not sure if this is a potential issue or not.
Having said that I did run a fresh install of Python 3.6.10
, installed requests
and sgqlc
and was unable to replicate this error (my request worked successfully).
@modasserbillah are you able to share more information regarding your configuration or steps to replicate from a fresh install? Might just be an old requests
version as @barbieri said.
Thanks for looking into it! My requests
version is 2.13.0
and Python
version is 3.6
. I'll check the session.send()
and get back to you.
@modasserbillah that's a 3 year old version of requests
, I highly suggest you upgrade to a newer version.
@barbieri not sure if we should update the Pipfile with some minimum version numbers for the dependencies, let me know what you think (I'm not a very active Python developer, so not sure what's the common practice around it is)
@strazeadin I'd suggest using a minimum version in setup.py and reflect that in the pipfile.
Pipfile is not mandatory, most people will ignore it (unlike in NodeJS where everyone uses the same package.json). Then setup.py
is where the official deps go, but good to be reflected in the Pipfile as well.
could we close this?
Yeah, updating requests solved it. I think this can be closed.
I am trying to use the RequestsEndpoint to query AppSync. Here's what I tried:
Here's what I get:
Any idea why this is happening? The
HTTPEndpoint
works fine with the same input.