bravado
bravado copied to clipboard
FidoClient errors with TypeError: 'NoneType' object is not iterable
I tried to switch from bravado.requests.HTTPClient, to the FidoClient, but I get the following traceback when trying to use it.
Using virtualenv setup in /nail/home/bmarty/pg/scrubbed/virtualenv_run
Traceback (most recent call last):
File "test_forward.py", line 63, in <module>
_request_options=_request_options,
File "/nail/home/bmarty/pg/scrubbed/virtualenv_run/local/lib/python2.7/site-packages/bravado/client.py", line 264, in __call__
also_return_response=also_return_response)
File "/nail/home/bmarty/pg/scrubbed/virtualenv_run/local/lib/python2.7/site-packages/bravado/fido_client.py", line 69, in request
request_for_twisted = self.prepare_request_for_twisted(request_params)
File "/nail/home/bmarty/pg/scrubbed/virtualenv_run/local/lib/python2.7/site-packages/bravado/fido_client.py", line 106, in prepare_request_for_twisted
method=request_params.get('method')
File "/nail/home/bmarty/pg/scrubbed/virtualenv_run/local/lib/python2.7/site-packages/requests/models.py", line 313, in prepare
self.prepare_hooks(hooks)
File "/nail/home/bmarty/pg/scrubbed/virtualenv_run/local/lib/python2.7/site-packages/requests/models.py", line 517, in prepare_hooks
for event in hooks:
TypeError: 'NoneType' object is not iterable
Hi bxm156, Can you please provide some more info on how to reproduce this? We've been using FidoClient for months now and I've never seen this traceback
@bxm156 At least in my case, I forgot to append the .result() to the call of my api.
pet = client.pet.getPetById(petId=42).result()