Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.18 KB | None | 0 0
  1.  
  2. ValueError
  3.  
  4. ValueError: insecure string pickle
  5. Traceback (most recent call last)
  6.  
  7. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1997, in __call__
  8.  
  9. error = None
  10.  
  11. ctx.auto_pop(error)
  12.  
  13.  
  14.  
  15. def __call__(self, environ, start_response):
  16.  
  17. """Shortcut for :attr:`wsgi_app`."""
  18.  
  19. return self.wsgi_app(environ, start_response)
  20.  
  21.  
  22.  
  23. def __repr__(self):
  24.  
  25. return '<%s %r>' % (
  26.  
  27. self.__class__.__name__,
  28.  
  29. self.name,
  30.  
  31. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1985, in wsgi_app
  32.  
  33. try:
  34.  
  35. try:
  36.  
  37. response = self.full_dispatch_request()
  38.  
  39. except Exception as e:
  40.  
  41. error = e
  42.  
  43. response = self.handle_exception(e)
  44.  
  45. except:
  46.  
  47. error = sys.exc_info()[1]
  48.  
  49. raise
  50.  
  51. return response(environ, start_response)
  52.  
  53. finally:
  54.  
  55. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1540, in handle_exception
  56.  
  57. # if we want to repropagate the exception, we can attempt to
  58.  
  59. # raise it with the whole traceback in case we can do that
  60.  
  61. # (the function was actually called from the except part)
  62.  
  63. # otherwise, we just raise the error again
  64.  
  65. if exc_value is e:
  66.  
  67. reraise(exc_type, exc_value, tb)
  68.  
  69. else:
  70.  
  71. raise e
  72.  
  73.  
  74.  
  75. self.log_exception((exc_type, exc_value, tb))
  76.  
  77. if handler is None:
  78.  
  79. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
  80.  
  81. ctx = self.request_context(environ)
  82.  
  83. ctx.push()
  84.  
  85. error = None
  86.  
  87. try:
  88.  
  89. try:
  90.  
  91. response = self.full_dispatch_request()
  92.  
  93. except Exception as e:
  94.  
  95. error = e
  96.  
  97. response = self.handle_exception(e)
  98.  
  99. except:
  100.  
  101. error = sys.exc_info()[1]
  102.  
  103. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
  104.  
  105. request_started.send(self)
  106.  
  107. rv = self.preprocess_request()
  108.  
  109. if rv is None:
  110.  
  111. rv = self.dispatch_request()
  112.  
  113. except Exception as e:
  114.  
  115. rv = self.handle_user_exception(e)
  116.  
  117. return self.finalize_request(rv)
  118.  
  119.  
  120.  
  121. def finalize_request(self, rv, from_error_handler=False):
  122.  
  123. """Given the return value from a view function this finalizes
  124.  
  125. the request by converting it into a response and invoking the
  126.  
  127. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception
  128.  
  129. return self.handle_http_exception(e)
  130.  
  131.  
  132.  
  133. handler = self._find_error_handler(e)
  134.  
  135.  
  136.  
  137. if handler is None:
  138.  
  139. reraise(exc_type, exc_value, tb)
  140.  
  141. return handler(e)
  142.  
  143.  
  144.  
  145. def handle_exception(self, e):
  146.  
  147. """Default exception handling that kicks in when an exception
  148.  
  149. occurs that is not caught. In debug mode the exception will
  150.  
  151. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request
  152.  
  153. self.try_trigger_before_first_request_functions()
  154.  
  155. try:
  156.  
  157. request_started.send(self)
  158.  
  159. rv = self.preprocess_request()
  160.  
  161. if rv is None:
  162.  
  163. rv = self.dispatch_request()
  164.  
  165. except Exception as e:
  166.  
  167. rv = self.handle_user_exception(e)
  168.  
  169. return self.finalize_request(rv)
  170.  
  171.  
  172.  
  173. def finalize_request(self, rv, from_error_handler=False):
  174.  
  175. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request
  176.  
  177. # request came with the OPTIONS method, reply automatically
  178.  
  179. if getattr(rule, 'provide_automatic_options', False) \
  180.  
  181. and req.method == 'OPTIONS':
  182.  
  183. return self.make_default_options_response()
  184.  
  185. # otherwise dispatch to the handler for that endpoint
  186.  
  187. return self.view_functions[rule.endpoint](**req.view_args)
  188.  
  189.  
  190.  
  191. def full_dispatch_request(self):
  192.  
  193. """Dispatches the request and on top of that performs request
  194.  
  195. pre and postprocessing as well as HTTP exception catching and
  196.  
  197. error handling.
  198.  
  199. File "/home/roosa/work/blogfeed/src/feed.py", line 107, in newpost
  200.  
  201. @app.route("/newpost", methods=["POST"])
  202.  
  203. def newpost():
  204.  
  205. # TODO: proper save to database, this is for testing purposes right now
  206.  
  207. picklestr = base64.urlsafe_b64decode(request.data)
  208.  
  209. # return picklestr
  210.  
  211. postObj = pickle.loads(picklestr)
  212.  
  213. return "POST RECEIVED: " + postObj['Subject']
  214.  
  215.  
  216.  
  217.  
  218.  
  219. ## TODO: VERY important! DISABLED THIS IN PRODUCTION
  220.  
  221. app = DebuggedApplication(app, evalex=True, console_path='/debugconsole')
  222.  
  223. ValueError: insecure string pickle
  224.  
  225. This is the Copy/Paste friendly version of the traceback. You can also paste this traceback into a gist:
  226. Traceback (most recent call last):
  227. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1997, in __call__
  228. return self.wsgi_app(environ, start_response)
  229. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1985, in wsgi_app
  230. response = self.handle_exception(e)
  231. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1540, in handle_exception
  232. reraise(exc_type, exc_value, tb)
  233. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
  234. response = self.full_dispatch_request()
  235. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
  236. rv = self.handle_user_exception(e)
  237. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception
  238. reraise(exc_type, exc_value, tb)
  239. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request
  240. rv = self.dispatch_request()
  241. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request
  242. return self.view_functions[rule.endpoint](**req.view_args)
  243. File "/home/roosa/work/blogfeed/src/feed.py", line 107, in newpost
  244. postObj = pickle.loads(picklestr)
  245. ValueError: insecure string pickle
  246. The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. If you enable JavaScript you can also use additional features such as code execution (if the evalex feature is enabled), automatic pasting of the exceptions and much more.
  247. Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.
  248. Console Locked
  249.  
  250. The console is locked and needs to be unlocked by entering the PIN. You can find the PIN printed out on the standard output of your shell that runs the server.
  251.  
  252. PIN:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement