TheDiscDb / data

Source data for thediscdb
MIT License
23 stars 9 forks source link

ImportBuddy 0.8 Unhandled Exception #24

Closed ctrl-shift-w closed 3 weeks ago

ctrl-shift-w commented 4 weeks ago

Repro steps: Launch ImportBuddy Import input TMDBID Select Movie Exception occurs

Exception:

Unhandled exception. System.InvalidOperationException: Reflection-based serialization has been disabled for this application. Either use the source generator APIs or explicitly configure the 'JsonSerializerOptions.TypeInfoResolver' property.
   at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_JsonSerializerIsReflectionDisabled()
   at System.Text.Json.JsonSerializerOptions.ConfigureForJsonSerializer()
   at System.Text.Json.JsonSerializerOptions.MakeReadOnly(Boolean)
   at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions, Type)
   at System.Text.Json.JsonSerializer.GetTypeInfo[T](JsonSerializerOptions)
   at System.Text.Json.JsonSerializer.DeserializeAsync[TValue](Stream , JsonSerializerOptions , CancellationToken )
   at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent, JsonSerializerOptions, CancellationToken)
   at Fantastic.TheMovieDb.TheMovieDbClient.MakeRequest[T](String, CancellationToken )
   at Fantastic.TheMovieDb.TheMovieDbClient.<>c__DisplayClass22_0`1.<<GetItemById>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Fantastic.TheMovieDb.Caching.FileSystem.FileSystemCache.TryGet[T](String, Func`1, CancellationToken)
   at Fantastic.TheMovieDb.TheMovieDbClient.GetMovie(String, String , CancellationToken )
   at ImportBuddy.TmdbByIdImportTask.GetImportItem(String, String, CancellationToken ) in C:\code\thediscdb\web\tools\ImportBuddy\Import\TmdbByIdImportTask.cs:line 42
   at ImportBuddy.ImportTask.Run(CommandLineOptions, CancellationToken) in C:\code\thediscdb\web\tools\ImportBuddy\Import\ImportTask.cs:line 71
   at ImportBuddy.Shell.Run(CommandLineOptions, CancellationToken) in C:\code\thediscdb\web\tools\ImportBuddy\Shell.cs:line 35
   at ImportBuddy.Program.Main(String[]) in C:\code\thediscdb\web\tools\ImportBuddy\Program.cs:line 16
   at ImportBuddy.Program.<Main>(String[])
lfoust commented 3 weeks ago

New version .9 released (and now the source is available here: https://github.com/TheDiscDb/data/tree/main/tools/ImportBuddy/source/ImportBuddy). Thanks again for all your help and for sticking with this!