Advertisement
Guest User

Untitled

a guest
Jul 15th, 2013
603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.66 KB | None | 0 0
  1. TypeError
  2. TypeError: ObjectId('51e1cfda4ed6db61932a0a0a') is not JSON serializable
  3.  
  4. Traceback (most recent call last)
  5. File "/home/alex/dev/repos/minitwit-mongodb/env/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
  6. return self.wsgi_app(environ, start_response)
  7. File "/home/alex/dev/repos/minitwit-mongodb/env/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
  8. response = self.make_response(self.handle_exception(e))
  9. File "/home/alex/dev/repos/minitwit-mongodb/env/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
  10. reraise(exc_type, exc_value, tb)
  11. File "/home/alex/dev/repos/minitwit-mongodb/env/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
  12. response = self.full_dispatch_request()
  13. File "/home/alex/dev/repos/minitwit-mongodb/env/lib/python2.7/site-packages/flask/app.py", line 1479, in full_dispatch_request
  14. response = self.process_response(response)
  15. File "/home/alex/dev/repos/minitwit-mongodb/env/lib/python2.7/site-packages/flask/app.py", line 1693, in process_response
  16. self.save_session(ctx.session, response)
  17. File "/home/alex/dev/repos/minitwit-mongodb/env/lib/python2.7/site-packages/flask/app.py", line 837, in save_session
  18. return self.session_interface.save_session(self, session, response)
  19. File "/home/alex/dev/repos/minitwit-mongodb/env/lib/python2.7/site-packages/flask/sessions.py", line 326, in save_session
  20. val = self.get_signing_serializer(app).dumps(dict(session))
  21. File "/home/alex/dev/repos/minitwit-mongodb/env/lib/python2.7/site-packages/itsdangerous.py", line 537, in dumps
  22. payload = want_bytes(self.dump_payload(obj))
  23. File "/home/alex/dev/repos/minitwit-mongodb/env/lib/python2.7/site-packages/itsdangerous.py", line 809, in dump_payload
  24. json = super(URLSafeSerializerMixin, self).dump_payload(obj)
  25. File "/home/alex/dev/repos/minitwit-mongodb/env/lib/python2.7/site-packages/itsdangerous.py", line 522, in dump_payload
  26. return want_bytes(self.serializer.dumps(obj))
  27. File "/home/alex/dev/repos/minitwit-mongodb/env/lib/python2.7/site-packages/flask/sessions.py", line 85, in dumps
  28. return json.dumps(_tag(value), separators=(',', ':'))
  29. File "/home/alex/dev/repos/minitwit-mongodb/env/lib/python2.7/site-packages/flask/json.py", line 126, in dumps
  30. rv = _json.dumps(obj, **kwargs)
  31. File "/usr/lib/python2.7/json/__init__.py", line 238, in dumps
  32. **kw).encode(obj)
  33. File "/usr/lib/python2.7/json/encoder.py", line 203, in encode
  34. chunks = list(chunks)
  35. File "/usr/lib/python2.7/json/encoder.py", line 428, in _iterencode
  36. for chunk in _iterencode_dict(o, _current_indent_level):
  37. File "/usr/lib/python2.7/json/encoder.py", line 402, in _iterencode_dict
  38. for chunk in chunks:
  39. File "/usr/lib/python2.7/json/encoder.py", line 436, in _iterencode
  40. o = _default(o)
  41. File "/home/alex/dev/repos/minitwit-mongodb/env/lib/python2.7/site-packages/flask/json.py", line 83, in default
  42. return _json.JSONEncoder.default(self, o)
  43. File "/usr/lib/python2.7/json/encoder.py", line 178, in default
  44. raise TypeError(repr(o) + " is not JSON serializable")
  45. TypeError: ObjectId('51e1cfda4ed6db61932a0a0a') is not JSON serializable
  46. The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
  47. To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.
  48.  
  49. You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:
  50.  
  51. dump() shows all variables in the frame
  52. dump(obj) dumps all that's known about the object
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement