Advertisement
CristianCantoro

flask_mwoauth_bug_#15

Jul 5th, 2016
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 5.73 KB | None | 0 0
  1. [...]
  2. Traceback (most recent call last):
  3.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
  4.     return self.wsgi_app(environ, start_response)
  5.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/werkzeug/wsgi.py", line 639, in __call__
  6.     return app(environ, start_response)
  7.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
  8.     return self.wsgi_app(environ, start_response)
  9.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
  10.     response = self.make_response(self.handle_exception(e))
  11.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
  12.     reraise(exc_type, exc_value, tb)
  13.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
  14.     response = self.full_dispatch_request()
  15.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
  16.     rv = self.handle_user_exception(e)
  17.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
  18.     reraise(exc_type, exc_value, tb)
  19.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
  20.     rv = self.dispatch_request()
  21.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
  22.     return self.view_functions[rule.endpoint](**req.view_args)
  23.   File "/home/cristian/extra/wtosm/dev/app/wiki.py", line 312, in preview
  24.     if mwoauth.get_current_user(False) is None:
  25.   File "build/bdist.linux-x86_64/egg/flask_mwoauth/__init__.py", line 151, in get_current_user
  26.     data = self.request({'action': 'query', 'meta': 'userinfo'})
  27.   File "build/bdist.linux-x86_64/egg/flask_mwoauth/__init__.py", line 144, in request
  28.     content_type="text/plain").data
  29.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/Flask_OAuthlib-0.9.3-py2.7.egg/flask_oauthlib/client.py", line 397, in post
  30.     return self.request(*args, **kwargs)
  31.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/Flask_OAuthlib-0.9.3-py2.7.egg/flask_oauthlib/client.py", line 457, in request
  32.     url, http_method=method, body=data, headers=headers
  33.   File "build/bdist.linux-x86_64/egg/oauthlib/oauth1/rfc5849/__init__.py", line 283, in sign
  34.     CONTENT_TYPE_FORM_URLENCODED))
  35. ValueError: Body contains parameters but Content-Type header was text/plain instead of application/x-www-form-urlencoded
  36. 127.0.0.1 - - [05/Jul/2016 20:25:11] "GET /app/login?next=%2Fwtosm%2Fapp%2Flogin%2Fsuccess HTTP/1.1" 302 -
  37. 127.0.0.1 - - [05/Jul/2016 20:25:14] "GET /?oauth_verifier=2ec2ed4b4931037e6893fd22399eac54&oauth_token=dad76b2c5205a52a4b957090aa21b8eb HTTP/1.1" 302 -
  38. 127.0.0.1 - - [05/Jul/2016 20:25:15] "GET /app/oauth-callback?oauth_verifier=2ec2ed4b4931037e6893fd22399eac54&oauth_token=dad76b2c5205a52a4b957090aa21b8eb HTTP/1.1" 500 -
  39. Traceback (most recent call last):
  40.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
  41.     return self.wsgi_app(environ, start_response)
  42.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/werkzeug/wsgi.py", line 639, in __call__
  43.     return app(environ, start_response)
  44.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
  45.     return self.wsgi_app(environ, start_response)
  46.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
  47.     response = self.make_response(self.handle_exception(e))
  48.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
  49.     reraise(exc_type, exc_value, tb)
  50.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
  51.     response = self.full_dispatch_request()
  52.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
  53.     rv = self.handle_user_exception(e)
  54.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
  55.     reraise(exc_type, exc_value, tb)
  56.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
  57.     rv = self.dispatch_request()
  58.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
  59.     return self.view_functions[rule.endpoint](**req.view_args)
  60.   File "build/bdist.linux-x86_64/egg/flask_mwoauth/__init__.py", line 90, in oauth_authorized
  61.     username = self.get_current_user(False)
  62.   File "build/bdist.linux-x86_64/egg/flask_mwoauth/__init__.py", line 151, in get_current_user
  63.     data = self.request({'action': 'query', 'meta': 'userinfo'})
  64.   File "build/bdist.linux-x86_64/egg/flask_mwoauth/__init__.py", line 144, in request
  65.     content_type="text/plain").data
  66.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/Flask_OAuthlib-0.9.3-py2.7.egg/flask_oauthlib/client.py", line 397, in post
  67.     return self.request(*args, **kwargs)
  68.   File "/home/cristian/.virtualenvs/wtosm/lib/python2.7/site-packages/Flask_OAuthlib-0.9.3-py2.7.egg/flask_oauthlib/client.py", line 457, in request
  69.     url, http_method=method, body=data, headers=headers
  70.   File "build/bdist.linux-x86_64/egg/oauthlib/oauth1/rfc5849/__init__.py", line 283, in sign
  71.     CONTENT_TYPE_FORM_URLENCODED))
  72. ValueError: Body contains parameters but Content-Type header was text/plain instead of application/x-www-form-urlencoded
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement