import issues

33 views
Skip to first unread message

Dave S

unread,
Dec 1, 2016, 8:37:36 PM12/1/16
to web2py-users
As a move to use tcpdump to look at the actual raw response (my issue where it appears I need to force an ascii response),
I copied my controller code from my dev machine to a test machine.  And ran into import errors trying to import simplejson. (The ticket says it was trying to load applications.myapp.modules.simplejson, so I tried changing it with a "from contrib.simplejson.simplejson" -- oops, there's no simplejson.py in gluon/contrib/simplejson, so that still errors (different ticket).

What am I missing?  I'm seeing this on both 2.14.4 and 2.14.6 on the test machine (which has been running the other functions of the controller for ages and ages).

/dps

Niphlod

unread,
Dec 2, 2016, 7:50:28 AM12/2/16
to web2py-users
simplejson was dropped, as we target 2.7 only and there's the json module globally available. you should use that.

I **think** this still works, but it's the only thing permitted.


from gluon.contrib.simplejson import json

Dave S

unread,
Dec 2, 2016, 3:04:26 PM12/2/16
to web2py-users


On Friday, December 2, 2016 at 4:50:28 AM UTC-8, Niphlod wrote:
simplejson was dropped, as we target 2.7 only and there's the json module globally available. you should use that.

I **think** this still works, but it's the only thing permitted.


from gluon.contrib.simplejson import json


Okay, switching away from simplejson gets me going, so I can update the other thread.  Thanks!

/dps
Reply all
Reply to author
Forward
0 new messages