0

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)
mishap_n
  • 578
  • 2
  • 10
  • 23
  • have you tried verifying your credentials to see if auth was successful? [link](https://twython.readthedocs.org/en/latest/usage/basic_usage.html#user-information) – Syntactic Fructose Jul 24 '15 at 17:13
  • What's the Twython version you have installed? (`print twython.__version__`). I've confirmed that `create_mute` is not present in 3.2.0, but is present in the current version, 3.3.0. – bgporter Jul 24 '15 at 17:24
  • It was indeed, the twython version. Well...at least it wasn't a super yak shaving session. – mishap_n Jul 24 '15 at 17:42

0 Answers0