It looks like python is interpreting the % as a printf-like format character. Try using %%?
"SELECT fileid
FROM files
WHERE description LIKE '%%%s%%'
OR filename LIKE '%%%s%%'
OR uploader LIKE '%%%s%%'
ORDER BY fileid DESC" % (search, search, search)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…