Skip to content
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

FidoClient errors with TypeError: 'NoneType' object is not iterable #243

Open
bxm156 opened this issue Aug 19, 2016 · 2 comments
Open

FidoClient errors with TypeError: 'NoneType' object is not iterable #243

bxm156 opened this issue Aug 19, 2016 · 2 comments

Comments

@bxm156
Copy link
Member

bxm156 commented Aug 19, 2016

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
@bxm156 bxm156 changed the title FidoClient errors when trying to pass in _request_options. FidoClient errors with TypeError: 'NoneType' object is not iterable Aug 19, 2016
@lucagiovagnoli
Copy link
Contributor

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

@lcofre
Copy link

lcofre commented Sep 12, 2017

@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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants