[mythtvnz] xmlTVNZ mythfilldatabase duplicate entry for key

Mike Dilger mythtvnz@lists.linuxnut.co.nz
Tue, 15 May 2007 05:25:36 +1200


Starting about a week ago, I started getting errors from my guide data
loading scripts that look
like this.

    2007-05-15 05:15:48.155 DB Error (program insert):
    Query was:
    INSERT INTO program
    (chanid,starttime,endtime,title,subtitle,description,category,category_type,airdate,stars,previouslyshown,title_pronounce,stereo,subtitled,hdtv,closecaptioned,partnumber,parttotal,seriesid,originalairdate,showtype,colorcode,syndicatedepisodenumber,programid)
    VALUES(1003,'2007-05-22T00:10:00','2007-05-22T01:10:00','Infomercials','','Infomercials
    for your shop at home
    pleasure.','Infomercial','','2007','',0,'',0,0,0,0,'','','160244227',NULL,'','','','');
    Driver error was [2/1062]:
    QMYSQL3: Unable to execute query
    Database error was:
    Duplicate entry '' for key 4


Anybody know what is going on?   By now all my guide is empty.  xmlTVNZ
scrapes, and I can
view the XML file, but mythfilldatabase just spits out tons of these
errors, and nothing gets added.

Is there maybe a database update that didn't take properly?   My version
of mythtv was probably upgraded (I run upgrades via gentoo every month
or so).

 (xmlTVNZ 2.5.0.0, mysql 5.0.38, mythtv 0.20.1_p13344)

-Mike



    mysql> describe program
        -> ;
    +-------------------------+------------------+------+-----+---------------------+-------+
    | Field                   | Type             | Null | Key |
    Default             | Extra |
    +-------------------------+------------------+------+-----+---------------------+-------+
    | chanid                  | int(10) unsigned | NO   | PRI |
    0                   |       |
    | starttime               | datetime         | NO   | PRI |
    0000-00-00 00:00:00 |       |
    | endtime                 | datetime         | NO   | MUL |
    0000-00-00 00:00:00 |       |
    | title                   | varchar(128)     | NO   | MUL
    |                     |       |
    | subtitle                | varchar(128)     | NO   |    
    |                     |       |
    | description             | text             | NO   |    
    |                     |       |
    | category                | varchar(64)      | NO   |    
    |                     |       |
    | category_type           | varchar(64)      | NO   |    
    |                     |       |
    | airdate                 | year(4)          | NO   |     |
    0000                |       |
    | stars                   | float            | NO   |     |
    0                   |       |
    | previouslyshown         | tinyint(4)       | NO   |     |
    0                   |       |
    | title_pronounce         | varchar(128)     | NO   | MUL
    |                     |       |
    | stereo                  | tinyint(1)       | NO   |     |
    0                   |       |
    | subtitled               | tinyint(1)       | NO   |     |
    0                   |       |
    | hdtv                    | tinyint(1)       | NO   |     |
    0                   |       |
    | closecaptioned          | tinyint(1)       | NO   |     |
    0                   |       |
    | partnumber              | int(11)          | NO   |     |
    0                   |       |
    | parttotal               | int(11)          | NO   |     |
    0                   |       |
    | seriesid                | varchar(12)      | NO   | MUL
    |                     |       |
    | originalairdate         | date             | YES  |     |
    NULL                |       |
    | showtype                | varchar(30)      | NO   |    
    |                     |       |
    | colorcode               | varchar(20)      | NO   |    
    |                     |       |
    | syndicatedepisodenumber | varchar(20)      | NO   |    
    |                     |       |
    | programid               | varchar(20)      | NO   | MUL
    |                     |       |
    | manualid                | int(10) unsigned | NO   | PRI |
    0                   |       |
    | generic                 | tinyint(1)       | YES  |     |
    0                   |       |
    | listingsource           | int(11)          | NO   |     |
    0                   |       |
    | first                   | tinyint(1)       | NO   |     |
    0                   |       |
    | last                    | tinyint(1)       | NO   |     |
    0                   |       |
    +-------------------------+------------------+------+-----+---------------------+-------+
    29 rows in set (0.00 sec)