0

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 ?

1
  • Please post more of your code and the callstack from python. None password should be no problem. Commented May 7, 2011 at 12:49

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.