XMLTV import of tvguide.xml fails (1 Viewer)

TheBatfink

MP Donator
  • Premium Supporter
  • June 11, 2007
    1,288
    221
    Nottingham
    Home Country
    United Kingdom United Kingdom
    Hi.

    I am downloading an xml file via mc2xml from schedules direct json service. When Load/Refresh I get action message 'Error'. The log says:

    [2017-12-11 20:42:57,629] [Log ] [SetupTv ] [ERROR] - Failed loading channels/mappings : channel erro trying to add empty key
    [2017-12-11 20:42:57,629] [Log ] [SetupTv ] [ERROR] - at Tst.TstDictionary.Add(String key, Object value)
    at SetupTv.Sections.XmlTvSetup.buttonRefresh_Click(Object sender, EventArgs e)

    I'm kind of at a loss. I don't see anyone reporting this searching forum. Guessing there is something malformatted in the xml but bit beyond me. I am attempting to attach tvguide.xml to this post but it was 200mb and 20mb after zipping.. maybe to big. Any suggestions to move forward would be greatly appreciated.
     

    Attachments

    • tvguide.zip
      21 MB

    cewillis

    MP Donator
  • Premium Supporter
  • August 27, 2010
    327
    13
    Home Country
    United States of America United States of America
    I have no answers -- but I had the same problem trying to import a tvguide.xml generated by zap2xml using TVGuide.com as source. Regenerating the tvguide.xml fixed the problem in my case.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello folks

    The cause of the problem is this channel in the XMLTV file:
    Code:
        <channel id="I807.91115.schedulesdirect.org">
            <display-name>807 </display-name>
            <display-name>807</display-name>
            <display-name></display-name>
        </channel>

    I'm not sure if the XMLTV standard allows empty display names, but TV Server's XMLTV plugin certainly can't handle them.

    From the look of the associated programs it's a new channel which will launch soon:
    Code:
        <programme start="20171211180000 +0000" stop="20171211220000 +0000" channel="I807.91115.schedulesdirect.org">
           <title lang="en">Coming Soon</title>
           <desc lang="en">GEO Entertainment coming soon.</desc>
           <category lang="en">Special</category>
           <episode-num system="dd_progid">SH02066328.0000</episode-num>
           <previously-shown start="20141123000000" />
       </programme>


    If I were you I'd ask the mc2xml developer(s) to amend mc2xml such that it doesn't generate XMLTV files containing empty channel display names.
     

    TheBatfink

    MP Donator
  • Premium Supporter
  • June 11, 2007
    1,288
    221
    Nottingham
    Home Country
    United Kingdom United Kingdom
    Hi MM.

    How did you find this issue? Is there some tool that returns something more verbose than what is going in the standard log. Like how do I find what key this is complaining about so I can fix the file?

    Code:
    [2018-02-11 17:06:13,924] [Log    ] [XmlTvImporter] [ERROR] - XML tv import error loading C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv\tvguide.xml err:The given key was not present in the dictionary.
        at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
       at TvEngine.XMLTVImport.Import(String fileName, Boolean deleteBeforeImport, Boolean showProgress)

    Thanks
     

    Users who are viewing this thread

    Top Bottom