title: TypeError: __init__() missing 2 required positional arguments: 'access_token' and 'access_token_secret'
body: <p>I am trying to fetch the tweets from Twitter via tweepy API and for that, I have written the following code consisting of sockets for connecting to the pyspark for further analysis of the tweets that are being fetched.
  Code:</p>
  <pre><code>import tweepy
  from tweepy import OAuthHandler
  from tweepy import Stream
  import socket
  import json
  
  consumer_key=&quot;IvWeydhuRZoHbigNvX9wl8FbX&quot;
  consumer_secret=&quot;hv9NnWV64f4ECnK3eqJIhwQiu0SoDMtL1b9ImPJJFPwSSKleOg&quot;
  access_token=&quot;3945967939-cqy1y3J6cPcKi2fohK3qr5QSB2Z3lrOcs863tPI&quot;
  access_secret=&quot;oJIXDC37NsRU1FNP4jznCyIVwRiBjaHF9L3qsyxybkykS&quot;
  
  class TweetListener(Stream):
      def __init__(self, csocket):
          self.client_socket=csocket
      def on_data(self, data):
          try:
              msg = json.loads(data)
              print(msg('text').encode('utf-8'))
              self.client_socket.send(msg('text').encode('utf-8'))
              return True
          except BaseException as e:
              print('Error %s'%str(e))
          return True
      def on_error(self, status):
          print(status)
          return True
  
  def send_data(c_socket):
      auth = OAuthHandler(consumer_key,consumer_secret)
      auth.set_access_token(access_token,access_secret)
      twtr_stream = Stream(auth, TweetListener(c_socket))
      twtr_stream.filter(track=['ETH'])
  
  s = socket.socket()
  host = &quot;127.0.0.1&quot;
  port = 5000
  s.bind((host,port))
  print(&quot;Active port %s&quot;%str(port))
  
  send_data(c)
  </code></pre>
  <p>Error in the ouput:</p>
  <pre><code>TypeError                                 Traceback (most recent call last)
  /tmp/ipykernel_22860/3758390964.py in &lt;module&gt;
  ----&gt; 1 send_data(c)
  
  /tmp/ipykernel_22860/1165989285.py in send_data(c_socket)
        2     auth = OAuthHandler(consumer_key,consumer_secret)
        3     auth.set_access_token(access_token,access_secret)
  ----&gt; 4     twtr_stream = Stream(auth, TweetListener(c_socket))
        5     twtr_stream.filter(track=['ETH'])
  
  TypeError: __init__() missing 2 required positional arguments: 'access_token' and 'access_token_secret'
  </code></pre>