- Notifications
You must be signed in to change notification settings - Fork 90
Description
Not sure how to describe this issue since I've very new to using pyswagger.
When I run client.request multiple times, the first time it runs fine, each successive time an https: gets appended to the URL.
Here's a reproducible scenario and hopefully you can tell me where I'm going wrong
from pyswagger import SwaggerApp from pyswagger.contrib.client.requests import Client app = SwaggerApp._create_('https://esi.tech.ccp.is/latest/swagger.json') client = Client() # No auth market_order_operation = app.op['get_markets_region_id_orders']( region_id=10000002, type_id=34, order_type='all', ) item_order = client.request(market_order_operation) In [28]: item_order.status
Out[28]: 200
This runs fine.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Now just call the client.request again and an https: is appended to the URL
client.request(market_order_operation) /usr/local/lib/python2.7/dist-packages/pyswagger-0.8.26-py2.7.egg/pyswagger/contrib/client/requests.pyc in request(self, req_and_resp, opt)
62 )
63 rq = self.__s.prepare_request(rq)
---> 64 rs = self.__s.send(rq, stream=True, **self.__send_opt)
65
66 resp.apply_with(
/usr/lib/python2.7/dist-packages/requests/sessions.pyc in send(self, request, **kwargs)
551
552 # Get the appropriate adapter to use
--> 553 adapter = self.get_adapter(url=request.url)
554
555 # Start time (approximately) of the request
/usr/lib/python2.7/dist-packages/requests/sessions.pyc in get_adapter(self, url)
596
597 # Nothing matches :-/
--> 598 raise InvalidSchema("No connection adapters were found for '%s'" % url)
599
600 def close(self):
InvalidSchema: No connection adapters were found for https:https://esi.tech.ccp.is/latest/markets/10000002/orders/?type_id=34&order_type=all&page=1&datasource=tranquility'
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Now just call the client.request a 3rd time https:https: is appended to the URL
client.request(market_order_operation) InvalidSchema Traceback (most recent call last)
in ()
----> 1 client.request(market_order_operation)
/usr/local/lib/python2.7/dist-packages/pyswagger-0.8.26-py2.7.egg/pyswagger/contrib/client/requests.pyc in request(self, req_and_resp, opt)
62 )
63 rq = self.__s.prepare_request(rq)
---> 64 rs = self.__s.send(rq, stream=True, **self.__send_opt)
65
66 resp.apply_with(
/usr/lib/python2.7/dist-packages/requests/sessions.pyc in send(self, request, **kwargs)
551
552 # Get the appropriate adapter to use
--> 553 adapter = self.get_adapter(url=request.url)
554
555 # Start time (approximately) of the request
/usr/lib/python2.7/dist-packages/requests/sessions.pyc in get_adapter(self, url)
596
597 # Nothing matches :-/
--> 598 raise InvalidSchema("No connection adapters were found for '%s'" % url)
599
600 def close(self):
InvalidSchema: No connection adapters were found for https:https:https://esi.tech.ccp.is/latest/markets/10000002/orders/?type_id=34&order_type=all&page=1&datasource=tranquility'
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Each time you run client.request another https: gets appended