nfdi4plants / arc-validate

Home of all the tools and libraries to create and run validation of ARCs
https://nfdi4plants.github.io/arc-validate/
MIT License
3 stars 2 forks source link

[BUG] User Comment cannot be resolved #79

Closed omaus closed 4 months ago

omaus commented 5 months ago

When building an ARCGraph with a token list containing at least one User Comment, the following occurs:

System.Collections.Generic.KeyNotFoundException: The given key 'User Comment' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ARCExpect.ARCGraph.isPartOfHeader(IParam header, Dictionary`2 ontoGraph, IParam ip) in C:\Repos\nfdi4plants\arc-validate\src\ARCExpect\ARCGraph.fs:line 353
   at ARCExpect.ARCGraph.matchTerms@383-6.Invoke(IParam ip) in C:\Repos\nfdi4plants\arc-validate\src\ARCExpect\ARCGraph.fs:line 383
   at Microsoft.FSharp.Collections.SeqModule.Exists[T](FSharpFunc`2 predicate, IEnumerable`1 source) in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 671
   at ARCExpect.ARCGraph.matchTerms@377.Invoke(Int32 i, Tuple`2 tupledArg) in C:\Repos\nfdi4plants\arc-validate\src\ARCExpect\ARCGraph.fs:line 383
   at Microsoft.FSharp.Collections.Internal.IEnumerator.mapi@145.DoMoveNext(b& curr) in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 150
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System.Collections.IEnumerator.MoveNext() in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 113
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source) in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 1003
   at ARCExpect.ARCGraph.constructIntermediateMetadataSubgraph(Dictionary`2 ontoGraph, IEnumerable`1 ips) in C:\Repos\nfdi4plants\arc-validate\src\ARCExpect\ARCGraph.fs:line 440
   at ARCExpect.ARCGraph.subgraphs@528.Invoke(IEnumerable`1 ips)
   at Microsoft.FSharp.Collections.Internal.IEnumerator.map@128.DoMoveNext(b& curr) in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 130
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System.Collections.IEnumerator.MoveNext() in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 113
   at Microsoft.FSharp.Collections.Internal.IEnumerator.map@128.DoMoveNext(b& curr) in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 130
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System.Collections.IEnumerator.MoveNext() in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 113
   at Microsoft.FSharp.Collections.Internal.IEnumerator.map@128.DoMoveNext(b& curr) in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 130
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System.Collections.IEnumerator.MoveNext() in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 113
   at Microsoft.FSharp.Collections.Internal.IEnumerator.map@128.DoMoveNext(b& curr) in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 130
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System.Collections.IEnumerator.MoveNext() in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 113
   at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeOuter@319[T,TResult](ConcatEnumerator`2 x, Unit unitVar0) in D:\a\_work\1\s\src\FSharp.Core\seqcore.fs:line 320
   at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeOuter@319[T,TResult](ConcatEnumerator`2 x, Unit unitVar0) in D:\a\_work\1\s\src\FSharp.Core\seqcore.fs:line 320
   at Microsoft.FSharp.Collections.Internal.IEnumerator.map@128.DoMoveNext(b& curr) in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 130
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System.Collections.IEnumerator.MoveNext() in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 113
   at Microsoft.FSharp.Collections.SeqModule.Iterate[T](FSharpFunc`2 action, IEnumerable`1 source) in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 631
   at <StartupCode$FSI_0010>.$FSI_0010.main@() in C:\Repos\nfdi4plants\arc-validate\playgrounds\qcPackage_prototypes\pride_prototype_v0.1.0.fsx:line 53
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Stopped due to error

Problem probably lies in isPartOfHeader function which cannot find the User Comment term in the given structural ontology.

kMutagene commented 4 months ago

this is solved right @omaus ?

omaus commented 4 months ago

I'm on it... 👍