subDesTagesMitExtraKaese / sinusbot-channel-statistics

log number of clients per channel to mysql
3 stars 0 forks source link

PLUGIN error: Error 1366 #2

Open buracat opened 1 year ago

buracat commented 1 year ago

Hi, I'm getting such an error. What could be the reason for this?

PLUGIN [channel-statistics:52:14] serverId: 2023/02/26 00:20:16 69c02752 def47082 PLUGIN error: Error 1366: Incorrect integer value: 'null' for column gaming_db.channel.parentId at row 1 2023/02/26 00:20:16 69c02752 def47082 PLUGIN [ bootstrap.js:1:930] undefined [] 2023/02/26 00:20:16 69c02752 def47082 PLUGIN error: Error 1366: Incorrect string value: '\xF0\x9F\x92\xA4(\xE1...' for column gaming_db.channel.name at row 1 2023/02/26 00:20:16 69c02752 def47082 PLUGIN error: Error 1366: Incorrect integer value: 'null' for column gaming_db.channel.parentId at row 1 2023/02/26 00:20:16 69c02752 def47082 PLUGIN error: Error 1366: Incorrect integer value: 'null' for column gaming_db.channel.parentId at row 1 2023/02/26 00:20:16 69c02752 def47082 PLUGIN [ bootstrap.js:1:930] undefined [] 2023/02/26 00:20:16 69c02752 def47082 PLUGIN error: Error 1366: Incorrect integer value: 'null' for column gaming_db.channel.parentId at row 1 2023/02/26 00:20:16 69c02752 def47082 PLUGIN error: Error 1366: Incorrect string value: '\xF0\x9F\x93\x9C' for column gaming_db.channel.name at row 1 2023/02/26 00:20:16 69c02752 def47082 PLUGIN error: Error 1366: Incorrect integer value: 'null' for column gaming_db.channel.parentId at row 1 2023/02/26 00:20:16 69c02752 def47082 PLUGIN error: Error 1366: Incorrect integer value: 'null' for column gaming_db.channel.parentId at row 1

subDesTagesMitExtraKaese commented 1 year ago

Hi buracat, there seem to be two different errors in your logs:

  1. Your channel names seem to have some characters containing \xF0\x9F\x93\x9C which is not a valid utf8 encoded string. I've chosen the MyISAM MySQL engine with a utf8mb4 encoding for the tables, but that won't work with that kind of bytes. maybe the code is missinterpreting another encoding? i'd have to read the sinusbot docs. it may also be possible to change the encoding of the sql table to match your channel name encoding.
  2. your column parentId in the table channel doesn't accept null values. But in the schema of createTables.sql it states that this column should be created accepting empty values: parentId int(11) DEFAULT NULL. You have made an error while setting up the tables. It is mandatory to insert channels without a parent channel because these are the root channels of your teamspeak server.
subDesTagesMitExtraKaese commented 1 year ago

https://github.com/subDesTagesMitExtraKaese/sinusbot-channel-statistics/issues/1#issuecomment-945013034

  1. seemed to have happened before