I try to stock string in my database with python script. But but when running the code I have this error cannot concatenate 'str' and 'NoneType' objects.
How can i decode this string "Poste Si\xe8ge" to be stocked successfully
insert="INSERT INTO blacklist VALUES(INET_ATON('"+ long2ip(row[0]) +"'),NOW(),'"+ check.country +"',4,' ','"+detect[0]+"','"+ispTarget[0]+"')"
detect[0]=Poste Si\xe8ge
TypeError: cannot concatenate 'str' and 'NoneType' objects
Help me plz
+
) with a string and something you believe is a string but is actually not set. Can you provide more code to help you – Jaay Jan 16 '15 at 9:19check.country
,detect[0]
andispTarget[0]
– Jaay Jan 16 '15 at 9:22