title: Python socket not accepting port as variable from api
body: <p>I am running a socket script to wait for a connection using a port number from an api response </p>
  
  <pre><code>SELENIUMPORT = cont["Ports"][0]["PublicPort"]
  </code></pre>
  
  <p>I am converting it to an int using a function then I'm passing it to socket but it errors with </p>
  
  <pre><code>client.connect(('192.168.33.10',SELENIUMPORT))
  
  socket.error: [Errno 111] Connection refused
  </code></pre>