XMLTVImport duplicate item error (1 Viewer)

willemx

MP Donator
  • Premium Supporter
  • November 20, 2008
    48
    8
    Home Country
    Netherlands Netherlands
    XMLTVImport has worked for me without problems for many years, but lately it is producing errors and will not import channel data anymore.
    It reports that my tvguide.xml is invalid, claiming that there is some sort of duplicate item in the file. It does not say what that duplicate item is and also does not give any clue to where (on which line nr) this error occurs.
    I have tried to locate the offending line by downsizing the xml file up to the point where it contains only one item (1 channel with one program listing), but still the importer complains about a duplicate item.
    Can anyone advise on how to proceed debugging this error?
     

    Attachments

    • MediaPortalLogs_20_10_18__08_37.zip
      2.6 MB

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    AFAIK WebEPG(+) is not working well anymore. I would recommend that you take a look et EPG Buddy, a very powerful and easy to use tool that wil probably provide better information than WebEPG.

    So deactivating WebEPG in the TVServer setup, followed by installing and configuring EPG Buddy might be the way to go. You don't risk anything as you can always uninstall and reactivate WebEPG to return to the point where you started from.
     

    Jasmeet_181

    Portal Pro
    September 5, 2007
    421
    344
    Home Country
    United Kingdom United Kingdom
    Try uploading the xml file here. It seems to occur during or after Channel 5 HD each time:
    [2018-10-14 07:00:30,487] [Log ] [XmlTvImporter] [INFO ] - channel#31 xmlid:Channel 5 name:Channel 5 HD dbsid:11355
    [2018-10-14 07:00:30,518] [Log ] [XmlTvImporter] [ERROR] - XML tv import error loading C:\Users\wille_000\AppData\Local\WebGrab+Plus\tvguide.xml err:Er is al een item met dezelfde sleutel toegevoegd.
    bij System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
    bij System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
    bij TvEngine.XMLTVImport.Import(String fileName, Boolean deleteBeforeImport, Boolean showProgress)
    [2018-10-14 07:00:30,549] [Log ] [XmlTvImporter] [INFO ] - Xmltv: imported 34 channels, 0 programs status:tvguide.xml:Invalid XML file:Er is al een item met dezelfde sleutel toegevoegd.;
    [2018-10-14 07:00:30,580] [Log ] [XmlTvImporter] [INFO ] - Xmltv: waiting for database to finish inserting imported programs.
    [2018-10-14 07:00:30,580] [Log ] [XmlTvImporter] [INFO ] - plugin:xmltv import done
     

    willemx

    MP Donator
  • Premium Supporter
  • November 20, 2008
    48
    8
    Home Country
    Netherlands Netherlands
    @HTPCSourcer : I am not using WebEPG. I use WebGrab++ to generate tvguide.xml which is imported by MediaPortals build-in XmlTv import plugin.

    @Jasmeet_181 : I had also noticed that the error occurred after the Channel 5 HD line. I then removed everything from the xml file until there was only one item left: 1 channel listing + 1 program listing. So I was sure there could not be duplicates in the file. But even then the 'duplicate' error did not go away.
    I think now that there must be something wrong inside the database, but I have no clue on how to check or correct this...
     

    willemx

    MP Donator
  • Premium Supporter
  • November 20, 2008
    48
    8
    Home Country
    Netherlands Netherlands
    I did some more testing:
    I created another simple tvguide.xml containing only 1 item (see attached file).
    I started the import by clicking the Import-button in Mediaportal TV Service configuration app.
    I checked what happened in 3 log files: SetupTv.log, TVService-error.log and TVService.log. (I pasted the relevant log lines together in the attached file logs.txt)

    As can be seen in SetupTv.log, I started the import at [2018-10-27 10:49:41,632]

    At [2018-10-27 10:49:42,242], (after less than a second) SetupTv.log reports: Xmltv: imported 1 channels, 1 programs status:tvguide.xml:File imported successfully;
    So you would expect everything to be ok,
    BUT:

    At [2018-10-27 10:50:29,627] (after nearly a minute), both TVService-error.log and TVService.log report:
    [XmlTvImporter] [ERROR] - XML tv import error loading C:\Users\wille_000\AppData\Local\WebGrab+Plus\tvguide.xml err:Er is al een item met dezelfde sleutel toegevoegd.
    bij System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
    bij System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
    bij TvEngine.XMLTVImport.Import(String fileName, Boolean deleteBeforeImport, Boolean showProgress)

    so, everything is not ok after all...

    my conclusions:
    • tvguide.xml is correct
    • something is wrong inside the database or something is wrong with the TvXML import plugin
    • the import plugin needs better log reporting like printing out the offending duplicate key value
     

    Attachments

    • logs.txt
      3.5 KB
    • tvguide.xml
      1.3 KB

    Users who are viewing this thread

    Top Bottom