cannot import name simplejson

Issue #236 new
Anonymous created an issue

django 1.7.2 pip install hg+

[Wed Jan 14 18:04:36 2015] [error] [client *.*.*.*]   File "/usr/local/lib/python2.7/dist-packages/piston/", line 25, in <module>
[Wed Jan 14 18:04:36 2015] [error] [client *.*.*.*]     from django.utils import simplejson
[Wed Jan 14 18:04:36 2015] [error] [client *.*.*.*] ImportError: cannot import name simplejson

is it project dead?

Comments (2)

  1. glennrub NA

    This did not work for me.

    I followed this pull request and this worked to solve the json error:

    When fixing the Json issue, there is a new one popping up:

    __init__() got an unexpected keyword argument 'mimetype'

    This next issue seems to be that HttpResponse in piston uses "mimetype" named argument which is deprecated, the new argument is now called "content_type":

    swapping out the line 204 (trunk 230) from named argument "mimetype" to "content_type" seems to work:

    resp = HttpResponse(stream, mimetype=ct, status=status_code)
    resp = HttpResponse(stream, content_type=ct, status=status_code)
  2. Log in to comment