开发者

pymysql issue 'NoneType' object has no attribute 'encode'

开发者 https://www.devze.com 2023-03-03 19:45 出处:网络
Hi i\'m trying to use pymysql. Here is the simpliest code import pymysql conn开发者_开发百科 = pymysql.connect(host=\'127.0.0.1\', port=3306, user=\'root\', passwd=None,

Hi i'm trying to use pymysql. Here is the simpliest code

import pymysql
conn开发者_开发百科 = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd=None,
                       db='newbase')

and i'm getting error: 'NoneType' object has no attribute 'encode'. i'm using easyphp5.3.6.0 What should i do ?


Looks like there is a problem with passwd=None parameter. Try to specify password as some string or do not pass this parameter.

0

精彩评论

暂无评论...
验证码 换一张
取 消