XMLTVImport duplicate item error

Discussion in 'xmlTV' started by willemx, October 20, 2018.

Tags:
  1. willemx
    • Premium Supporter

    willemx MP Donator

    Joined:
    November 20, 2008
    Messages:
    48
    Likes Received:
    4
    Ratings:
    +5 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    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?


     

    Attached Files:

  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. HTPCSourcer
    • Team MediaPortal
    • Administrator

    HTPCSourcer MP2 Product Manager

    Joined:
    May 16, 2008
    Messages:
    10,774
    Likes Received:
    1,125
    Gender:
    Male
    Ratings:
    +2,408 / 22
    Home Country:
    Germany Germany
    Show System Specs
    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.
     
  4. Jasmeet_181

    Jasmeet_181 Portal Pro

    Joined:
    September 5, 2007
    Messages:
    367
    Likes Received:
    131
    Ratings:
    +285 / 0
    Home Country:
    England England
    Try uploading the xml file here. It seems to occur during or after Channel 5 HD each time:
     
  5. willemx
    • Premium Supporter

    willemx MP Donator

    Joined:
    November 20, 2008
    Messages:
    48
    Likes Received:
    4
    Ratings:
    +5 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    @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...
     
  6. willemx
    • Premium Supporter

    willemx MP Donator

    Joined:
    November 20, 2008
    Messages:
    48
    Likes Received:
    4
    Ratings:
    +5 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    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
     

    Attached Files:

    • logs.txt
      File size:
      3.5 KB
      Uploaded:
      October 27, 2018
      Views:
      28
    • tvguide.xml
      File size:
      1.3 KB
      Uploaded:
      October 27, 2018
      Views:
      31
  7. willemx
    • Premium Supporter

    willemx MP Donator

    Joined:
    November 20, 2008
    Messages:
    48
    Likes Received:
    4
    Ratings:
    +5 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    • Like Like x 1
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!