I am running Python 2.7 (x64 Linux) and trying to convert a dict to a JSON object.
>>> import sys
>>> sys.version_info
sys.ver
This error just occurred for me in a different context, but still one of two things named json. I had named a "view" in Django (a Python function that prepares a response to an HTTP request), in this case a view to handle request for data in json format.
But I had named the view "json". Bad move. I was mystified when print dir(json) returned a dumps-free response in my view "json" whereas it showed "dumps" as an attribute in a similar view that worked.
This discussion fixed the problem for me.