In [2]:
!pip3 install tweepy


Requirement already satisfied: tweepy in c:\users\constantinos\anaconda3\lib\site-packages
Requirement already satisfied: requests>=2.4.3 in c:\users\constantinos\anaconda3\lib\site-packages (from tweepy)
Requirement already satisfied: requests_oauthlib>=0.4.1 in c:\users\constantinos\anaconda3\lib\site-packages (from tweepy)
Requirement already satisfied: six>=1.7.3 in c:\users\constantinos\anaconda3\lib\site-packages (from tweepy)
Requirement already satisfied: oauthlib>=0.6.2 in c:\users\constantinos\anaconda3\lib\site-packages (from requests_oauthlib>=0.4.1->tweepy)

In [3]:
import tweepy
from credentials import *

In [4]:
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_TOKEN, ACCESS_SECRET)
api = tweepy.API(auth)

In [11]:
print(api.send_direct_message("kgeorgiadis_law", "892126467500511235", "892126467500511235", "hello a third time!"))


---------------------------------------------------------------------------
TweepError                                Traceback (most recent call last)
<ipython-input-11-c1e1a77e1a89> in <module>()
----> 1 print(api.send_direct_message("kgeorgiadis_law", "892126467500511235", "892126467500511235", "hello a third time!"))

C:\Users\Constantinos\Anaconda3\lib\site-packages\tweepy\binder.py in _call(*args, **kwargs)
    243             return method
    244         else:
--> 245             return method.execute()
    246 
    247     # Set pagination mode

C:\Users\Constantinos\Anaconda3\lib\site-packages\tweepy\binder.py in execute(self)
    227                     raise RateLimitError(error_msg, resp)
    228                 else:
--> 229                     raise TweepError(error_msg, resp, api_code=api_error_code)
    230 
    231             # Parse the response payload

TweepError: [{'code': 34, 'message': 'Sorry, that page does not exist.'}]