On Sep 8, 5:40 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > I think I fixed some of this in trunk. Could you print form me the > line offending hit? If i see it I can fix the regular expression too. > Thanks. >
I ran the new version from trunk. The if hit!=None: line added at line 74 covers up the problem so now I get a key error on double. Added a new key to data_type_map at line 38 datetime = 'datetime', double = 'double', ) Now it runs to completion and prints out a model. The line that is causing the problem with hit is line 75 before I added above key name, d_type = hit.group(1), hit.group(2) because hit is None The listing of the auth_event table is missing the field for `description` longtext, because of the if hit!-None: test from this mysqldump output for the auth_event table CREATE TABLE `auth_event` ( `id` int(11) NOT NULL AUTO_INCREMENT, `time_stamp` datetime DEFAULT NULL, `client_ip` varchar(512) DEFAULT NULL, `user_id` int(11) DEFAULT NULL, `origin` varchar(512) DEFAULT NULL, `description` longtext, PRIMARY KEY (`id`), KEY `user_id__idx` (`user_id`), CONSTRAINT `auth_event_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; It appears the hit = re.search('(\S+) (\S+) .*', line) fails the test because there is nothing after the field type on the description line but I am guessing. There is also no longtext type in the data_type_map. It is very close. Of course there could be other key errors because my database might not have every data type but I could check the MySQL manual for that.