On Tue, Dec 2, 2014 at 6:45 AM, Chris Cioffi <ch...@evenprimes.com> wrote: > File "/Users/chris/dev/LendingClub/lendingclub.py", line 40, in > _make_api_call > pprint(lcresponse.read()) > TypeError: 'module' object is not callable > > The relevant code is as follows: > lcrequest = urllib.request.Request(url, data, {"Authorization": > authorizationKey}) > lcresponse = urllib.request.urlopen(lcrequest) > > Any ideas on what I should be looking for? Based on the docs and examples I > would expect this to work.
Your problem isn't with urllib, but with pprint. The pprint module exposes a function called pprint; you can use it either like this: from pprint import pprint pprint(some_object) Or like this: import pprint pprint.pprint(some_object) It looks like you're mixing and matching the two forms. All the best! ChrisA -- https://mail.python.org/mailman/listinfo/python-list