Reputation: 13
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 ?
Upvotes: 0
Views: 2807
Reputation: 29727
Looks like there is a problem with passwd=None
parameter. Try to specify password as some string or do not pass this parameter.
Upvotes: 1