I'm just trying to use create_mute with Twython. But I keep getting this error and I'm not sure what I'm doing wrong. Python 2.7+ just running it locally out of my terminal to see if it works.
from twython import Twython, TwythonError
import sys
## data from account (these are filled in properly, in my file) ###
APP_KEY = 'XXXXXXXXXXXX'
APP_SECRET = 'XXXXXXXXXXXX'
OAUTH_TOKEN = 'XXXXXXXXXXXX'
OAUTH_TOKEN_SECRET = 'XXXXXXXXXXXX'
if len(sys.argv) >= 2:
target = sys.argv[1]
else:
target = raw_input("User to mute: ")
twitter = Twython(APP_KEY, APP_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
try:
twitter.create_mute(screen_name=target)
except TwythonError as e:
print(e)