KSP-CKAN / NetKAN

Metadata files used by the NetKAN/CKAN indexer for KSP
Creative Commons Zero v1.0 Universal
72 stars 340 forks source link

ArgumentOutOfRangeException while parsing github information #4

Closed christianvdstap closed 9 years ago

christianvdstap commented 10 years ago

netkan file:

{
    "spec_version"   : 1,
    "name"           : "Extraplanetary Launchpads",
    "abstract"       : "Adds the ability to build crafts in flight mode to your game.",
    "identifier"     : "ExtraPlanetaryLaunchpads",
    "$kref"          : "#/ckan/github/taniwha-qf/Extraplanetary-Launchpads",
    "license"        : "LGPL-3.0",
    "release_status" : "stable",
    "ksp_version"    : "0.25",
    "resources"      : {
        "homepage" : "http://forum.kerbalspaceprogram.com/threads/59545"
    },
    "depends"        : [
        {"name" : "ModuleManager"},
    {"name" : "Toolbar"}
    ],
    "recommends"     : [
        {"name" : "KerbalStats"},
    {"name" : "KerbalAttachementSystem"},
    {"name" : "InfernalRobotics"},
    {"name" : "Kethane"}
    ],
    "install"        : [
        {
            "file"       : "ExtraplanetaryLaunchpads",
            "install_to" : "GameData",
        "filter"     : "Ships"
        },
        {
            "file"       : "ExtraplanetaryLaunchpads/Ships",
            "install_to" : "Ships"
        }
    ]
}

command output:

mono ../netkan.exe ../NetKAN/NetKAN/Extraplanetary-Launchpads.netkan 

Unhandled Exception:
System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[Newtonsoft.Json.Linq.JToken].get_Item (Int32 index) [0x00000] in <filename unknown>:0 
  at Newtonsoft.Json.Linq.JContainer.GetItem (Int32 index) [0x00000] in <filename unknown>:0 
  at Newtonsoft.Json.Linq.JArray.get_Item (Int32 index) [0x00000] in <filename unknown>:0 
  at CKAN.NetKAN.GithubAPI.GetLatestRelease (System.String repository) [0x00000] in <filename unknown>:0 
  at CKAN.NetKAN.MainClass.GitHub (Newtonsoft.Json.Linq.JObject orig_metadata, System.String repo, CKAN.Cache cache) [0x00000] in <filename unknown>:0 
  at CKAN.NetKAN.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[Newtonsoft.Json.Linq.JToken].get_Item (Int32 index) [0x00000] in <filename unknown>:0 
  at Newtonsoft.Json.Linq.JContainer.GetItem (Int32 index) [0x00000] in <filename unknown>:0 
  at Newtonsoft.Json.Linq.JArray.get_Item (Int32 index) [0x00000] in <filename unknown>:0 
  at CKAN.NetKAN.GithubAPI.GetLatestRelease (System.String repository) [0x00000] in <filename unknown>:0 
  at CKAN.NetKAN.MainClass.GitHub (Newtonsoft.Json.Linq.JObject orig_metadata, System.String repo, CKAN.Cache cache) [0x00000] in <filename unknown>:0 
  at CKAN.NetKAN.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 
pjf commented 10 years ago

Ah! This would be because EL doesn't have real github releases, so the release page there is really just showing a list of tags. Right now we don't exactly handle that very cleanly.

Although on the topic of EL itself, it's probably worth me asking @taniwha-qf if we can have the latest EL releases can be uploaded to the github release page, because it looks like they're very simple CKAN installs otherwise.

pjf commented 10 years ago

Nudging @taniwha-qf on this a little; did we end up with anything from the awesome automatic release uploading tool for github?

hakan42 commented 9 years ago

This issue was moved to KSP-CKAN/CKAN-netkan#25

pjf commented 9 years ago

reopening, but with the query of whether we still have this problem?

Dazpoet commented 9 years ago

Running the exact .netkan file from the original post I get told that there are no releases and that netkan is aborting due to an error. Looks clean enough for me.

As for the indexing of this mod we currently index it manually over in CKAN-meta from taniwhas own homepage.

mheguy commented 9 years ago

As the thread establishes: the netkan in the OP doesn't work because there are no releases on github. We don't have a .netkan for EPL in the repo, and EPL is manually indexed in CKAN-meta.

Closing this.