Cannot reproduce code execution of the LanguageDetection sample
Closed this issue · 3 comments
Describe the bug
Referencing the latest NuGet package, Catalyst 1.0.16767, and essentially putting the code of the sample for Language Detection, throws an exception.
The exception: {"Unable to load one or more of the requested types.\r\nA ByRef-like type cannot be used as the type for an instance field in a non-ByRef-like type."}
Essentially the same as the sample, but I have tried the sample locally, updated the package to match, and it works...
I am also using .NET 5, the same as the sample.
The sensible part of the stacktrace is:
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at Mosaik.Core.ObjectStore.<>c.b__28_1(Assembly a)
at System.Linq.Enumerable.SelectManySingleSelectorIterator2.MoveNext() at System.Linq.Set
1.UnionWith(IEnumerable1 other) at System.Linq.Enumerable.UnionIterator
1.FillSet()
at System.Linq.Enumerable.UnionIterator1.ToArray() at System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 source)
at Mosaik.Core.ObjectStore.CreateDerivedFromModelDictionary()
at Mosaik.Core.ObjectStore.<>c.<.cctor>b__32_0()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy
1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy1.CreateValue() at System.Lazy
1.get_Value()
at Mosaik.Core.ObjectStore.TryGetFormerNames(String name, String[]& formerNames)
at Catalyst.Models.FastText.d__42.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Catalyst.Models.FastText.<FromStoreAsync_Internal>d__41.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Catalyst.Models.FastTextLanguageDetector.<FromStoreAsync>d__5.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()
Could it be an issue with getting the Language files from the store? if so, how is detailed how to do this?
To Reproduce
Create a new project, add reference to Catalyst, paste the code and run.
Expected behavior
runs flawlessly, language is returned.
Additional context
Add any other context about the problem here.
Hi @joslat , are you still seeing this issue?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.