title: Unable to Connect to Cassandra from Python code
body: <p>I am not able to connect cassandra from python getting the below error </p>
  
  <pre class="lang-py prettyprint-override"><code>Traceback (most recent call last):
    File "/app/script_max_device_count.py", line 232, in &lt;module&gt;
      max_device_count.get_max_device_count_per_partner(partners_dict)
    File "/app/script_max_device_count.py", line 199, in get_max_device_count_per_partner
      session = self.establish_cassandra_connection()
    File "/app/script_max_device_count.py", line 137, in establish_cassandra_connection
      session = Cluster([cassandra_host], port=cassandra_port, auth_provider=auth_provider).connect()
    File "/usr/local/lib/python3.7/site-packages/cassandra/cluster.py", line 1358, in connect
      self.control_connection.connect()
    File "/usr/local/lib/python3.7/site-packages/cassandra/cluster.py", line 2896, in connect
      self._set_new_connection(self._reconnect_internal())
    File "/usr/local/lib/python3.7/site-packages/cassandra/cluster.py", line 2939, in _reconnect_internal
      raise NoHostAvailable("Unable to connect to any servers", errors)
  cassandra.cluster.NoHostAvailable: ('Unable to connect to any servers', {'1XX.XX.X.X:9042': ValueError("invalid literal for int() with base 10: '3-E000'")})
  </code></pre>
  
  <p>Version used </p>
  
  <pre class="lang-sh prettyprint-override"><code>python = 3.7.4
  cassandra-driver==3.18.0
  </code></pre>
  
  <p>Linux environment<br>
  cassandra installed is </p>
  
  <pre><code>[cqlsh 5.0.1 | Cassandra 3.11.3-E000 | CQL spec 3.4.4 | Native protocol v4]
  </code></pre>
  
  <p>Sample cassandra code connection</p>
  
  <pre><code>``
  def establish_cassandra_connection(self):
          db_config = DatabaseConfig()
          cassandra_host = db_config.get_cassandra_host()
          cassandra_port = int(db_config.get_cassandra_port())
          cassandra_username = db_config.get_cassandra_username()
          cassandra_password = db_config.get_cassandra_password()
          auth_provider = PlainTextAuthProvider(username=cassandra_username, password=cassandra_password)
          # connection.setup can have multiple host can be added as a list.
          session = Cluster([cassandra_host], port=cassandra_port, auth_provider=auth_provider).connect()
          logger.info("Cassandra Connection Established.")
          return session 
  ``
  </code></pre>