You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "speedcomplainer.py", line 101, in run
self.tweetResults(speedTestResults)
File "speedcomplainer.py", line 138, in tweetResults
api = twitter.Api(consumer_key=self.config['twitter']['twitterConsumerKey'],
AttributeError: 'module' object has no attribute 'Api'
I suggest the substitution for the library twython as below:
from twython import Twython
TOKEN=self.config['twitter']['twitterTokenSecret']
CON_SEC_KEY=self.config['twitter']['twitterConsumerKey']
SEC=self.config['twitter']['twitterConsumerSecret']
KEY=self.config['twitter']['twitterToken']
api = Twython(CON_SEC_KEY, CON_SEC,TOKEN_KEY, TOKEN)
if api:
api.update_status(status=message)
The text was updated successfully, but these errors were encountered:
just want to ask where am I supposed to sub this code? I inserted mine at ln146 and the issue persists. I have added from twython import Twython and also commented out
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "speedcomplainer.py", line 101, in run
self.tweetResults(speedTestResults)
File "speedcomplainer.py", line 138, in tweetResults
api = twitter.Api(consumer_key=self.config['twitter']['twitterConsumerKey'],
AttributeError: 'module' object has no attribute 'Api'
I suggest the substitution for the library twython as below:
from twython import Twython
TOKEN=self.config['twitter']['twitterTokenSecret']
CON_SEC_KEY=self.config['twitter']['twitterConsumerKey']
SEC=self.config['twitter']['twitterConsumerSecret']
KEY=self.config['twitter']['twitterToken']
api = Twython(CON_SEC_KEY, CON_SEC,TOKEN_KEY, TOKEN)
if api:
The text was updated successfully, but these errors were encountered: