Re: no attribute JSONEncoder

463 views
Skip to first unread message

Nikolas Stevenson-Molnar

unread,
Jan 21, 2013, 11:26:06 PM1/21/13
to django...@googlegroups.com
Does this happen only in production running via mod_wsgi, or does it
happen in local development with the Django dev server as well?

_Nik

On 1/21/2013 4:13 PM, ghjim wrote:
> Hello,
>
> I am getting an error when I access my root WSGIScriptAlias /:
>
> AttributeError at /
> module object has no attribute JSONEncoder.
>
> I have seen similar reports on the web, some of them implying that
> this is a python bug
> but I can't implement any of the fixes.
>
> I am using Django 1.4.3 and Python2.7.3, mod_wsgi 3.4.
>
> With my Python2.7.3 installation I have both json amd simplejson
> (I can import "json as simplejson" and print a directory of attributes
> for
> the module simplejson. It includes JSONEncoder.
>
> I was hoping somebody has seen this.
>
> Thanks
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/_-xDLgBkMRYJ.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

ghjim

unread,
Jan 23, 2013, 11:08:25 AM1/23/13
to django...@googlegroups.com
The dev server works fine.  This only happens in my production server via mod_wsgi.

Nikolas Stevenson-Molnar

unread,
Jan 23, 2013, 3:15:50 PM1/23/13
to django...@googlegroups.com
Are you sure that mod_wsgi was built against Python 2.7 (you may have 2.7 installed on your system, but mod_wsgi may be using an older version). Did you use a pre-built mod_wsgi or did you build it yourself?

_Nik
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/qxlRVfEiy4YJ.

ghjim

unread,
Jan 23, 2013, 3:23:49 PM1/23/13
to django...@googlegroups.com
No, I rebuilt mod_wsgi with the new Python2.7.3.
Reply all
Reply to author
Forward
0 new messages