SemEval-2018 Task 1: Affect in Tweets (AIT-2018) Forum

Go back to competition Back to thread list Post in this thread

> Authorization Required Error

Hi,
I am trying to download the dataset using the revised script [1], but it seems that the consumer key/secret are broken somehow. I get the error below.
I would appreciate your help in fixing this issue.
Thanks,
Best Regards,
---
Omnia
[1] https://www.dropbox.com/s/1gapqijqgp7vg6q/download_tweets_api_revised.py?dl=0

"Hi there! We're gonna get you all set up to use Semeval sentiment analysis.
Traceback (most recent call last):
File "C:\Program Files\Python36\lib\site-packages\twitter\api.py", line 341, in _handle_response
handle = urllib_request.urlopen(req, **kwargs)
File "C:\Program Files\Python36\lib\urllib\request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "C:\Program Files\Python36\lib\urllib\request.py", line 532, in open
response = meth(req, response)
File "C:\Program Files\Python36\lib\urllib\request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Program Files\Python36\lib\urllib\request.py", line 570, in error
return self._call_chain(*args)
File "C:\Program Files\Python36\lib\urllib\request.py", line 504, in _call_chain
result = func(*args)
File "C:\Program Files\Python36\lib\urllib\request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Authorization Required

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/omnia/Desktop/Insight/PhDRelated/Datasets/SemEval2018/SemEval2018-AIT-DISC/download_tweets_api_revised.py", line 30, in <module>
oauth_dance("Semeval sentiment analysis", CONSUMER_KEY, CONSUMER_SECRET, MY_TWITTER_CREDS)
File "C:\Program Files\Python36\lib\site-packages\twitter\oauth_dance.py", line 93, in oauth_dance
twitter.oauth.request_token(oauth_callback="oob"))
File "C:\Program Files\Python36\lib\site-packages\twitter\api.py", line 334, in __call__
return self._handle_response(req, uri, arg_data, _timeout)
File "C:\Program Files\Python36\lib\site-packages\twitter\api.py", line 367, in _handle_response
raise TwitterHTTPError(e, uri, self.format, arg_data)
twitter.api.TwitterHTTPError: Twitter sent status 401 for URL: oauth/request_token using parameters: (oauth_callback=oob&oauth_consumer_key=JEdRRoDsfwzCtupkir4ivQ&oauth_nonce=18005018757375510243&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1530013055&oauth_version=1.0&oauth_signature=Ai3f2rBVg8tj0pEagkmMTLzPZSk%3D)
details: {"errors":[{"code":32,"message":"Could not authenticate you."}]}"

Posted by: omnia.zayed @ June 26, 2018, 11:52 a.m.
Post in this thread