I know this question was asked before here. The reason was a mismatch between the SQL schema and the inserted data.
So I made sure that the SQL schema matches my inserted data. But I get an IntegrityError Error. Could you tell me, where the datatype mismatch could be?
conn = sqlite3.connect("contdata_sql.db")
c = conn.cursor() # ich brauche ein Curser Object
c.execute('''CREATE TABLE imbalanced ([ChannelStatusResult] INTEGER PRIMARY KEY,
[Channels] text,
[Channel] text,
[Channel_Type] text,
[Channel_Name] text)''')
np.array(map(str, array_2d_sql))# make sure all values are strings
print("array_2d_sql = ",array_2d_sql)
# = ['ChannelStatusResult' 'Channels' 'Channel' 'ChannelName'
#'REST_RECEIVER_LOOKUP']
# ['ChannelStatusResult' 'Channels' 'Channel' 'ChannelID'
# '87842bb134ba31cf9c43685fabcd2eac']
...
print("array_2d_sql.shape = ",array_2d_sql.shape) # = (461, 5)
c.executemany('''INSERT INTO imbalanced VALUES (?,?,?,?,?)''', array_2d_sql) # Error occures here!!!