Python 'int32' Cannot Be Converted To A Mysql Type
In Python-MySQL, I have defined a table as follows: TABLES['clusters'] = ( 'CREATE TABLE `clusters` (' ' `pid` int(8) NOT NULL, ' ' `cluster` int(8), ' ' `cluste
Solution 1:
i had a similar problem. its probably because you're trying to insert numpy int32 and mysql cant support it. you can convert a numpy int to python int by running numpyint.item()
.
i would recommend checking the type of each variable you're trying to insert (type(foo)
) to make sure all the values are of type that mysql can support.
Post a Comment for "Python 'int32' Cannot Be Converted To A Mysql Type"