This project has moved. For the latest updates, please go here.

EARLY ACCESS 2.4.1: JSON Parse error of IMDB Response

Jan 3, 2015 at 6:25 PM
I am getting a JSON Parse error when decoding the response from IMDB.

INFORMATION> 2015-01-03T10:48:16 MCEBuddy.Engine.ConversionJob --> Converting file -> G:\ServerFolders\Movies\Staging\MasterChef_KCPQDT_2014_12_16_19_57_00.wtv
--> Dumping complete information about the file G:\ServerFolders\Movies\Staging\MasterChef_KCPQDT_2014_12_16_19_57_00.wtv
--> Process exited with code 0
INFORMATION> 2015-01-03T10:48:23 MCEBuddy.Engine.ConversionJob --> Running custom commands
2015-01-03T10:48:23 MCEBuddy.Transcode.CustomCommand --> Custom command parameters read ->
PreMetaCustomCommandPath =
PreMetaCustomCommandParameters =
PreMetaCustomCommandHangPeriod = 300
PreMetaCustomCommandCritical = False
PreMetaCustomCommandUISession = False
PreMetaCustomCommandShowWindow = True
PreMetaCustomCommandExitCodeCheck = False
INFORMATION> 2015-01-03T10:48:23 MCEBuddy.Transcode.CustomCommand --> No custom commands found
2015-01-03T10:48:23 MCEBuddy.Engine.ConversionJob --> Finished pre metadata custom command, source file size [KB] 7,121,664.00
INFORMATION> 2015-01-03T10:48:23 MCEBuddy.Engine.ConversionJob --> Getting show information and banner from Internet sources
2015-01-03T10:48:23 MCEBuddy.MetaData.VideoMetaData --> Extracting metadata from file -> G:\ServerFolders\Movies\Staging\MasterChef_KCPQDT_2014_12_16_19_57_00.wtv
INFORMATION> 2015-01-03T10:48:23 MCEBuddy.MetaData.VideoMetaData --> Extracting MCE Tags
2015-01-03T10:48:23 MCEBuddy.MetaData.VideoMetaData --> Extracting Windows Media Center meta data
2015-01-03T10:48:23 MCEBuddy.MetaData.VideoMetaData --> Video Tags extracted ->
Title: MasterChef
SubTitle: Junior Edition: The Finale
Description: Two finalists try to impress the judges as they prepare a three-course menu; the winner is announced.
Parental Rating: TV-PG
Media Credits: ;;;
Genres: Cooking,Series,Reality
Season: 0
Episode: 0
Banner: D:\Program Files\MCEBuddy2x\cache\MasterChef-extract.jpg
Banner URL:
MovieDB Id:
Is Show Movie: False
Is Show Sports: False
OriginalBroadcastDateTime: 2014-12-16T00:00:00
RecordedDateTime: 2014-12-16T19:57:12
SeriesPremiereDate: 1899-12-31T16:00:00
CopyProtected: False
SageTV FileID:
SageTV MediaFileID:

2015-01-03T10:48:23 MCEBuddy.MetaData.VideoMetaData --> Checking for metadata title and series correction
INFORMATION> 2015-01-03T10:48:23 MCEBuddy.MetaData.VideoMetaData --> Downloading Series details
INFORMATION> 2015-01-03T10:48:23 MCEBuddy.MetaData.VideoMetaData --> Recording Type Show
INFORMATION> 2015-01-03T10:48:23 MCEBuddy.MetaData.VideoMetaData --> Checking TheTVDB
--> No match found on TVDB
WARNING> 2015-01-03T10:48:23 MCEBuddy.MetaData.VideoMetaData --> TheTVDB failed
INFORMATION> 2015-01-03T10:48:23 MCEBuddy.MetaData.VideoMetaData --> Checking
--> No match found on
--> No match found on
WARNING> 2015-01-03T10:48:35 MCEBuddy.MetaData.VideoMetaData --> failed
INFORMATION> 2015-01-03T10:48:35 MCEBuddy.MetaData.VideoMetaData --> Checking IMDB
--> Searching IMDB Series with result offset 0
WARNING> --> Unable to connect to IMDB
Error -> Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[MCEBuddy.MetaData.MyApiFilms+SearchResults]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'code', line 1, position 8.
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 Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at MCEBuddy.MetaData.IMDB.DownloadSeriesDetails(Boolean matchByAirDate, VideoTags videoTags, Boolean dontOverwriteTitle, Log jobLog, Int32 offset)
--> Searching IMDB Series with result offset 0
WARNING> --> Unable to connect to IMDB
WARNING> 2015-01-03T10:48:39 MCEBuddy.MetaData.VideoMetaData --> IMDBApi failed
Jan 3, 2015 at 7:15 PM
That's because the website is timing out and not returning the information (incomplete JSON)
Jan 3, 2015 at 11:58 PM
I assumed so, but it doesn't quite make sense, the time between the steps is 4 seconds
INFORMATION> 2015-01-03T10:48:35 MCEBuddy.MetaData.VideoMetaData --> Checking IMDB
WARNING> 2015-01-03T10:48:39 MCEBuddy.MetaData.VideoMetaData --> IMDBApi failed

- 2015-01-03T10:48:35

                               4 seconds to timeout
That seems awfully quick...
I'm not sure what the code is set to, but it appears to me that you are receiving an empty stream on response, or an error response in the stream that is unexpected content.

Now, I'm just guessing, but 4 seconds to time out seems quick.

What I am trying to determine is if there is something I can do about it to improve this.
This is intermittent and doesn't seem to be show specific.
Also, this error type, JSON Deserialization seems new for the MCE 4.1 line
Jan 4, 2015 at 5:33 AM
JSON is a new feature with 2.4 series, it allows is to use more sources of data. We've been multiple issues with IMDB returning incomplete data because the server is overloaded or other issues. note we don't connect directly to imdb but rather through a 3rd party service.

Replicating the issue we found this returned:
{"code":509,"message":"Search too long, filter without seasons and/or actors"}
Need to investigate this further.
Jan 4, 2015 at 5:42 AM
Have put a fix for this, it might take longer to search IMDB now but it'll be more stable, try the new 2.4.2 BETA build.
Marked as answer by rboy1 on 1/3/2015 at 10:42 PM
Jan 4, 2015 at 5:55 AM
Thank you for your effort on this, if there is anything I can trace for you in the future I will be glad to help!
Jan 6, 2015 at 3:56 AM
And that seems to be resolved... I know that it doesn't actually fix the issue, but it seems more handled.