soruly / trace.moe

Anime Scene Search by Image
https://trace.moe
MIT License
4.54k stars 234 forks source link

synonyms_chinese array has string quotes outside of array #29

Closed ThomasAunvik closed 5 years ago

ThomasAunvik commented 5 years ago

I used this image, (Yes i know this is not how its not supposed to be used, but i tested it and i got json errors)

ypixp77o5p321

And the json response is: Json Response

As you can see here that synonyms_chinese is "synonyms_chinese":"[]", not

"synonyms_chinese":[

],

Since i am using Newtonsoft.Json for C# i am deserializing the object, but beacuse of this json value error is, i am getting this error, which is not fixable unless the json api is fixed, or i just ignore using that value at all. or use dynamic values.

Error: Error converting value "[]" to type 'System.Collections.Generic.List`1[System.String]'. Path 'docs[4].synonyms_chinese', line 1, position 3182.

EDIT:

Got same issue with this picture: (Spoilers sorry) black clover

Gist and location

You can find my project at: ThomasAunvik/AnimeListBot within class TraceMoe.cs

soruly commented 5 years ago

Looking into the database, I've found a total of 163 records with issues. https://github.com/soruly/anilist-chinese/commit/0ba8ef0a84831e45ebd3eba4a2a3d181cd8ccefc

The root cause lies in an admin page (which is not included in this repo) which manage anime titles. The DB records has been cleaned up and should be OK now.

Thanks for reporting this issue. ;)