Closed thmcmahon closed 10 years ago
So this issue is caused by the following code in request's PreparedRequest prepare method:
# Don't do any URL preparation for oddball schemes
if ':' in url and not url.lower().startswith('http'):
self.url = url
return
Since what we're attempting to build is a websocket connection (which has the scheme 'ws'), the parameters we pass to be prepared on the URL are getting dropped, and the URL is being returned without the query parameters.
We can work around this in swagger-py; I'll make a pull request there.
Pull request on swagger-py should fix this issue:
In a fresh virtual environment using the default versions that pip installs of
requests
andwebsocket-client
, the websocket fails to connect and returns the following error:Output of
pip freeze
that fails