Skip to content Skip to sidebar Skip to footer

Python 3.3 Socket Programming Error

In Python 3.3 I am getting an error while executing this line: print ('Message from server : ') + msg where msg is received data from server (Trying to do socket programming as yo

Solution 1:

print() returns None in Python 3. So, you're trying to concatenate(or add) None with msg, which results in an error.

Try string formatting:

print ("Message from server : {}".format(msg))

Post a Comment for "Python 3.3 Socket Programming Error"