title: I am getting this error "TypeError: str() takes at most 1 argument (2 given)" at "client_response" variable
body: <p>EDIT to format:</p>
  
  <p>This is the original code</p>
  
  <pre><code>from __future__ import print_function
  import socket
  import sys
  
  def socket_accept():
      conn, address = s.accept()
      print("Connection has been established | " + "IP " + address[0] + "| Port " + str(address[1]))
      send_commands(conn)
      conn.close()
  
  def send_commands(conn):
      while True:
          cmd = raw_input()
          if cmd == 'quit':
              conn.close()
              s.close()
              sys.exit()
          if len(str.encode(cmd)) &gt; 0:
              conn.send(str.encode(cmd))
              client_response = str(conn.recv(1024), "utf-8")
              print(client_response, end ="")
  
  def main():
      socket_accept()
      main()
  </code></pre>
  
  <p>I am getting this error “TypeError: str() takes at most 1 argument (2 given)” at “client_response” variable</p>