NoneType’ object has no attribute ’encoding把.my.cnf utf-8改成utf8default-character-set = utf8