#4196 Auto-tweeting doesnt work on Ask Fedora
Closed: Will Not/Can Not fix 6 years ago Opened 10 years ago by ankursinha.

= bug description =
Auto-tweeting gives an internal server error after authorizing the app on twitter.

= bug analysis =
Not sure yet. Looking through it.

= fix recommendation =


This crops up in the error log after the page errors out:

{{{
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] mod_wsgi (pid=17287): Exception occurred processing WSGI script '/usr/sbin/askbot.wsgi'.
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] Traceback (most recent call last):
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] File "/usr/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 241, in call
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] response = self.get_response(request)
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 179, in get_response
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 228, in handle_uncaught_exception
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] return callback(request, param_dict)
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] File "/usr/lib/python2.6/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] response = view_func(request, *args,
kwargs)
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] File "/usr/lib/python2.6/site-packages/django/views/defaults.py", line 33, in server_error
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] return http.HttpResponseServerError(t.render(Context({})))
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] File "/usr/lib/python2.6/site-packages/coffin/template/init.py", line 54, in render
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] return super(Template, self).render(**context)
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 669, in render
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] return self.environment.handle_exception(exc_info, True)
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] File "/usr/lib/python2.6/site-packages/askbot/templates/500.html", line 1, in top-level template code
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] {% extends "two_column_body.html" %}
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] File "/usr/lib/python2.6/site-packages/askbot/templates/two_column_body.html", line 1, in top-level template code
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] {% extends "base.html" %}
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] File "/usr/lib/python2.6/site-packages/askbot/templates/base.html", line 5, in top-level template code
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] <title>{% block title %}{% endblock %} - {{ settings.APP_TITLE|escape }}</title>
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 350, in getattr
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] return getattr(obj, attribute)
[Sun Jan 26 06:41:04 2014] [error] [client 192.168.1.63] UndefinedError: 'settings' is undefined
[Sun Jan 26 06:41:05 2014] [error] [client 192.168.1.14] File does not exist: /var/lib/askbot/upfiles/ask/ask_favicon.ico
[root@ask01 httpd]#
}}}

It's the '''exact same error''' that is logged when someone attempts to give feedback. Could be something tiny in our configuration?

This looks more relevant:

{{{
/usr/lib/python2.6/site-packages/django/core/handlers/base.py TIME: 2014-01-26 06:27:49,769 MSG: base.py:handle_uncaught_exception:215 Internal Server Error: /en/save-twitter-access-token/
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, callback_kwargs)
File "/usr/lib/python2.6/site-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view
return view_func(request, *args,
kwargs)
File "/usr/lib/python2.6/site-packages/askbot/views/sharing.py", line 27, in save_twitter_access_token
access_token_data = oauth.get_access_token(
AttributeError: 'OAuthConnection' object has no attribute 'get_access_token'
}}}

Was this fixed in stg? I was able to submit feedback on STG

Nope... tweeting doesn't work still as far as I can tell. ;(

{{{
/usr/lib/python2.6/site-packages/askbot/deps/django_authopenid/forms.py TIME: 2014-10-31 01:53:48,680 MSG: forms.py:clean:79 unknown provider name
/usr/lib/python2.6/site-packages/django/core/handlers/base.py TIME: 2014-10-31 10:19:27,329 MSG: base.py:handle_uncaught_exception:213 Internal Server Error: /en/save-twitter-access-token/
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 109, in get_response
response = callback(request, callback_args, callback_kwargs)
File "/usr/lib/python2.6/site-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view
return view_func(request, *args,
kwargs)
File "/usr/lib/python2.6/site-packages/askbot/views/sharing.py", line 23, in save_twitter_access_token
oauth_token = request.GET['oauth_token']
File "/usr/lib/python2.6/site-packages/django/utils/datastructures.py", line 258, in getitem
raise MultiValueDictKeyError("Key %r not found in %r" % (key, self))
MultiValueDictKeyError: "Key 'oauth_token' not found in <QueryDict: {u'denied': [u'z4JZJgCnVtxx3knWXHcq7fvbxymBLh9z']}>"
/usr/lib/python2.6/site-packages/django/core/handlers/base.py TIME: 2014-10-31 10:29:39,112 MSG: base.py:handle_uncaught_exception:213 Internal Server Error: /en/save-twitter-access-token/
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 109, in get_response
response = callback(request,
callback_args, callback_kwargs)
File "/usr/lib/python2.6/site-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view
return view_func(request, *args,
kwargs)
File "/usr/lib/python2.6/site-packages/askbot/views/sharing.py", line 27, in save_twitter_access_token
access_token_data = oauth.get_access_token(
AttributeError: 'OAuthConnection' object has no attribute 'get_access_token'
}}}

Upstream issue with the twitter implementation?

There is now no errors with 0.7.51, but it's still not working as far as I can tell. ;(

Needs more investigation.

is this a feature people really use? I tried it a while ago and get the same errors but, I don't see much need for it?

This feature is to be closed as "won't fix by us". If upstream fixes the tool we can look at implementing that.

Metadata Update from @smooge:
- Issue close_status updated to: Will Not/Can Not fix

6 years ago

Login to comment on this ticket.

Metadata