I found that the error was caused by having a comma in the number, so you can't convert "1,000" to INT, but "1000" is accepted.