As the error message says, it require an integer.
If you look at the documentation for the connect function, you will see that the server address need the port to be an integer.
raw_input() return the value as a string.

Furthermore, I don't think you should add ' ' around ip, as this is already an string.

This should give us something like the below code. It is untested, but you can give it a try.