Skip to content

Database trying to get a IPageIcon upon Query error #461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
SaxbyMod opened this issue May 22, 2025 · 1 comment
Open

Database trying to get a IPageIcon upon Query error #461

SaxbyMod opened this issue May 22, 2025 · 1 comment

Comments

@SaxbyMod
Copy link

Describe the bug
Fails to fetch the icon

To Reproduce
Steps to reproduce the behavior:

  1. Query a Database such as https://inscryption-pvp-wiki.notion.site/aa7158c620e14c1bade56faa7c09cd63?v=31c4f43f14dc465ab1f7d6a77b4ae79e

Expected behavior
It should not error

Printed Error

Unhandled exception. Newtonsoft.Json.JsonSerializationException: Could not create an instance of type Notion.Client.IPageIcon. Type is an interface or abstract class and cannot be instantiated. Path 'type', line 1, position 2080.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at JsonSubTypes.JsonSubtypes.ThreadStaticReadObject(JsonReader reader, JsonSerializer serializer, JToken jToken, Type targetType)
at JsonSubTypes.JsonSubtypes.ReadJson(JsonReader reader, Type objectType, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at JsonSubTypes.JsonSubtypes.ThreadStaticReadObject(JsonReader reader, JsonSerializer serializer, JToken jToken, Type targetType)
at JsonSubTypes.JsonSubtypes.ReadJson(JsonReader reader, Type objectType, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Notion.Client.Extensions.HttpResponseMessageExtensions.ParseStreamAsync[T](HttpResponseMessage response, JsonSerializerSettings serializerSettings)
at Notion.Client.RestClient.PostAsync[T](String uri, Object body, IEnumerable1 queryParams, IDictionary2 headers, JsonSerializerSettings serializerSettings, CancellationToken cancellationToken)
at Notion.Client.DatabasesClient.QueryAsync(String databaseId, DatabasesQueryParameters databasesQueryParameters, CancellationToken cancellationToken)
at KamWerksCardIndexCSharp.Notion.NotionEnd.RetryWithBackoff[T](Func`1 action, Int32 maxRetries)
at KamWerksCardIndexCSharp.Notion.NotionEnd.FetchAllPageIds(NotionClient client, String databaseId) in C:\Users\Thinc\Documents\GitHub\KamWerksCardIndexCSharp\KamWerksCardIndexCSharp\Notion\NotionEnd.cs:line 84
at KamWerksCardIndexCSharp.Notion.NotionEnd.NotionMain() in C:\Users\Thinc\Documents\GitHub\KamWerksCardIndexCSharp\KamWerksCardIndexCSharp\Notion\NotionEnd.cs:line 61
at KamWerksCardIndexCSharp.DiscordBot.DiscordEnd.HandleNotionAndDiscordAsync() in C:\Users\Thinc\Documents\GitHub\KamWerksCardIndexCSharp\KamWerksCardIndexCSharp\DiscordBot\DiscordEnd.cs:line 34
at KamWerksCardIndexCSharp.DiscordBot.DiscordEnd.Main() in C:\Users\Thinc\Documents\GitHub\KamWerksCardIndexCSharp\KamWerksCardIndexCSharp\DiscordBot\DiscordEnd.cs:line 19
at KamWerksCardIndexCSharp.DiscordBot.DiscordEnd.

()

For reference my Code Base: https://github.com/SaxbyMod/KamWerksCardIndexCSharp

Copy link

👋 Hi there! Thanks for opening your first issue in this repository. We appreciate your contribution. A maintainer will take a look soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant