>2010/10/7 DJ <sebastianjaya...@gmail.com>: > The legacy database to Web2py conversion would be a great add-on. I > get the following errors when I tried this script on a database with > tables having primary key 'id' set to autoincrement. > > C:\Program Files (x86)\web2py\scripts>extract_mysql_models.py > bio:b...@nrcf > Traceback (most recent call last): > File "C:\Program Files (x86)\web2py\scripts > \extract_mysql_models.py", line 106 > , in <module> > print mysql(m.group(3),m.group(1),m.group(2)) > File "C:\Program Files (x86)\web2py\scripts > \extract_mysql_models.py", line 82, > in mysql > table_name = re.search('CREATE TABLE .(\S+). \(', > sql_lines[0]).group(1) > AttributeError: 'NoneType' object has no attribute 'group'
Looks like sql_lines[0] is empty, the script has found no lines in output from mysqldump/mysql(they are statnalone programs that are part of MySQL server). Is MySQL server installed? Can you run mysqldump and mysql programs from the directory where the script is from command line? Did you check if the script can access mysqldump and mysql commands?