Skip to content

Instantly share code, notes, and snippets.

@skakri
Created March 31, 2013 23:10
Show Gist options
  • Save skakri/5282381 to your computer and use it in GitHub Desktop.
Save skakri/5282381 to your computer and use it in GitHub Desktop.
Traceback for "Flask example - missing relation 'social_auth_usersocialauth'" issue (project: omab/python-social-auth)
Traceback (most recent call last):
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/flask/app.py", line 1701, in __call__
return self.wsgi_app(environ, start_response)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/newrelic-1.10.2.38/newrelic/api/web_transaction.py", line 780, in __call__
result = application(environ, _start_response)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/newrelic-1.10.2.38/newrelic/api/object_wrapper.py", line 220, in __call__
self._nr_instance, args, kwargs)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/newrelic-1.10.2.38/newrelic/api/function_trace.py", line 93, in literal_wrapper
return wrapped(*args, **kwargs)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/flask/app.py", line 1689, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/newrelic-1.10.2.38/newrelic/api/object_wrapper.py", line 220, in __call__
self._nr_instance, args, kwargs)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/newrelic-1.10.2.38/newrelic/api/pre_function.py", line 14, in wrapper
return wrapped(*args, **kwargs)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/flask/app.py", line 1687, in wsgi_app
response = self.full_dispatch_request()
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/flask/app.py", line 1360, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/flask/app.py", line 1358, in full_dispatch_request
rv = self.dispatch_request()
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/flask/app.py", line 1344, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/social/apps/flask_app/utils.py", line 34, in wrapper
return func(backend, *args, **kwargs)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/social/apps/flask_app/routes.py", line 67, in complete
*args, **kwargs)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/social/strategies/base.py", line 44, in complete
return self.backend.auth_complete(*args, **kwargs)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/social/backends/facebook.py", line 80, in auth_complete
return self.do_auth(access_token, expires=expires, *args, **kwargs)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/social/backends/facebook.py", line 119, in do_auth
return self.strategy.authenticate(*args, **kwargs)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/social/strategies/flask_strategy.py", line 40, in authenticate
return self.backend.authenticate(*args, **kwargs)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/social/backends/base.py", line 80, in authenticate
is_new=False, *args, **kwargs)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/social/backends/base.py", line 93, in pipeline
result = func(*args, **out) or {}
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/social/pipeline/social_auth.py", line 6, in social_user
social_user = strategy.storage.user.get_social_auth(provider, uid)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/social/storage/sqlalchemy_orm.py", line 100, in get_social_auth
uid=uid)[0]
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2053, in __getitem__
return list(self[item:item + 1])[0]
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2048, in __getitem__
return list(res)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2252, in __iter__
return self._execute_and_instances(context)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2267, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 664, in execute
params)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 764, in _execute_clauseelement
compiled_sql, distilled_params
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 878, in _execute_context
context)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 871, in _execute_context
context)
File "/home/skakri/projects/test/virtualenv/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 320, in do_execute
cursor.execute(statement, parameters)
ProgrammingError: (ProgrammingError) relation "social_auth_usersocialauth" does not exist
LINE 2: FROM social_auth_usersocialauth
^
'SELECT social_auth_usersocialauth.id AS social_auth_usersocialauth_id, social_auth_usersocialauth.provider AS social_auth_usersocialauth_provider, social_auth_usersocialauth.uid AS social_auth_usersocialauth_uid, social_auth_usersocialauth.extra_data AS social_auth_usersocialauth_extra_data, social_auth_usersocialauth.user_id AS social_auth_usersocialauth_user_id \nFROM social_auth_usersocialauth \nWHERE social_auth_usersocialauth.uid = %(uid_1)s AND social_auth_usersocialauth.provider = %(provider_1)s \n LIMIT %(param_1)s' {'uid_1': u'1320955003', 'param_1': 1, 'provider_1': 'facebook'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment