You're passing None to the simplejson.loads method. You should check that your argument is valid before passing it or catch the TypeError and handle it.
Robert On Thu, May 12, 2011 at 05:17, mihir <[email protected]> wrote: > traceback: ------------------------------ > BEGIN--------------------------------- > Frame in ['main.py'] at line 30 Frame main in ['main.py'] at line 27 > Frame > run_wsgi_app in ['__init__.py'] at line 1076 Frame run in > ['handlers.py'] at > line 93 Frame finish_response in ['handlers.py'] at line 133 Frame > appstats_wsgi_wrapper in ['recording.py'] at line 857 Frame wsgi_app > in > ['__init__.py'] at line 378 Frame dispatch in ['__init__.py'] at line > 505 Frame > dispatch in ['handlers.py'] at line 82 Frame dispatch in > ['__init__.py'] at > line 179 Frame get in ['handlers.py'] at line 162 Frame commonhandler > in > ['handlers.py'] at line 159 Frame loads in ['__init__.py'] at line 232 > Frame > decode in ['decoder.py'] at line 251 _w = s = None self = Traceback > (most > recent call last): File > "/base/data/home/apps/wolfff4/14.348387106974957643/apps/wolf4/ > handlers.py", > line 65, in dispatch return RequestHandler.dispatch(self, *args, > **kwargs) File > "distlib/tipfy/__init__.py", line 171, in dispatch response = > method(**rule_args) File > "/base/data/home/apps/wolfff4/14.348387106974957643/apps/wolf4/rpc/ > handlers.py", > line 162, in get return self.commonhandler(**kwargs) File > "/base/data/home/apps/wolfff4/14.348387106974957643/apps/wolf4/rpc/ > handlers.py", > line 54, in commonhandler kwargs = > simplejson.loads(request.args.get('args', > None)) File > "/base/python_runtime/python_lib/versions/third_party/django-0.96/ > django/utils/simplejson/__init__.py", > line 232, in loads return cls(encoding=encoding, **kw).decode(s) File > "/base/python_runtime/python_lib/versions/third_party/django-0.96/ > django/utils/simplejson/decoder.py", > line 251, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) > > TypeError: expected string or buffer > > ============================================================================================== > > The error is reproducible when in " rpc/handlers.py " when i try to > write something to url which is calling its get method. the error is > at this line ----> kwargs = simplejson.loads(request.args.get('args', > None)) . > > need help with this traceback. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
