Failed to create MXF file error after update to 1.1.3

An evolving, supported alternative to Rovi
Important Information
★ Download the latest EPG123 here: http://epg123.garyan2.net <> Setup guide here: http://epg123.garyan2.net/downloads/epg123_Guide.pdf

Re: Failed to create MXF file error after update to 1.1.3

Post#21 » Fri Apr 14, 2017 3:37 pm

Yeah, 50% sounds about right. :lol: Or you could just slap one big try/catch around everything, just in case something slips through. ;)

Not knowing what the backend looks like, it's difficult to judge where one really needs exception handling, but it seems as if anything in the data feed is up for grabs because it's not all handled by SD. (If it were all SD, it'd probably always be valid.) As an aside, this is what I *don't* like about exceptions--they really clutter the code. I much prefer testing a return code. (Of course, that's just a personal preference--there are plenty of valid points to be made for each.)
User avatar
12noon
 
Posts: 37
Joined: 6 October 2014
USA 60005
WOW Chicago Suburbs - Digital
USA-IL58819-X

Post#22 » Fri Apr 14, 2017 4:21 pm

With my code, I'm pretty strict on the JSON structure, so minor perturbances can cause these exceptions. I have made allowances on some fields based on errors I've seen in the past (one of them even allowing either array or object), but in this case an allowance is not warranted. Next version looks like I'm going to add quite a few more lines of code to catch and properly handle these exceptions.

By the way, VS2015 counted the lines for me ... currently 5700+
codeMetrics.PNG
User avatar
garyan2
 
Posts: 2055
Joined: 27 November 2015
HTPC Specs: Show details
- Gary
Stomping out the Rovi disease, one media center at a time. http://epg123.garyan2.net

Post#23 » Fri Apr 14, 2017 8:42 pm

Yes, handling exceptions are always the last bit of code to get done, and often many exception handlers are never done simply because an exception has never happened in that particular section, so it just gets neglected. This seems to be how all code is unless you have a really anal developer :-) It's the least fun aspect of coding (for me, at least)...
Space
 
Posts: 1116
Joined: 2 June 2013

Post#24 » Sun Apr 16, 2017 9:36 pm

So does anyone encountering this issue have to contact SD individually or are they doing a general fix?
iluvtofu
 
Posts: 2
Joined: 13 April 2017

Post#25 » Sun Apr 16, 2017 10:02 pm

Schedules Direct fixed it a couple of hours later. SD's service is really shockingly fast--especially compared to Microsoft's glacial response when their guide data fails. Totally worth the money! :D (And, of course, thanks to garyan2 for making it possible.)
rkulagow wrote:Our upstream changed their API and didn't let us know, so that broke things on our ingest, which then cascaded to the outputted data. The ingest has been fixed and the schedules are being regenerated.

REF: viewtopic.php?p=116518#p116518
User avatar
12noon
 
Posts: 37
Joined: 6 October 2014
USA 60005
WOW Chicago Suburbs - Digital
USA-IL58819-X

Post#26 » Sun Apr 16, 2017 10:05 pm

iluvtofu wrote:So does anyone encountering this issue have to contact SD individually or are they doing a general fix?

What 12noon said. I just wanted to chime in and say I love the Kung Fu Panda reference in your handle! :thumbup: I can't read it without hearing it.
User avatar
garyan2
 
Posts: 2055
Joined: 27 November 2015
HTPC Specs: Show details
- Gary
Stomping out the Rovi disease, one media center at a time. http://epg123.garyan2.net

Post#27 » Sun Apr 16, 2017 10:12 pm

Running 1.1.4; same error just occurred (as others have already reported):

Code: Select all
[4/16/2017 6:02:56 PM] [ERROR] Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.String[]' 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 '[1889].programs[18].videoProperties.0', line 1, position 8928187.
User avatar
Ladislaus
 
Posts: 87
Joined: 26 January 2015
Location: NJ
HTPC Specs: Show details

Post#28 » Sun Apr 16, 2017 10:40 pm

Yep, seeing the same thing here (still on 1.0.2, need to upgrade but things have been hectic) Looks like still some problems at SD
stuartm
 
Posts: 300
Joined: 5 November 2012
Location: Longmont, CO
HTPC Specs: Show details

Post#29 » Sun Apr 16, 2017 10:44 pm

Ladislaus wrote:Running 1.1.4; same error just occurred (as others have already reported):

Code: Select all
[4/16/2017 6:02:56 PM] [ERROR] Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.String[]' 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 '[1889].programs[18].videoProperties.0', line 1, position 8928187.


Is there a way to actually see what data is causing the error?
rkulagow
 
Posts: 218
Joined: 19 July 2015
Location: Schedules Direct

Post#30 » Sun Apr 16, 2017 11:05 pm

rkulagow wrote:
Ladislaus wrote:Running 1.1.4; same error just occurred (as others have already reported):

Code: Select all
[4/16/2017 6:02:56 PM] [ERROR] Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.String[]' 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 '[1889].programs[18].videoProperties.0', line 1, position 8928187.


Is there a way to actually see what data is causing the error?

No, I don't save the errant response. In this case, it appears to be the same problem we had Friday with the videoProperties being a name:value instead of an array.

Note one of the reasons I don't save the response is the "position 8928187" where the error was at. The entire response is pretty big.
User avatar
garyan2
 
Posts: 2055
Joined: 27 November 2015
HTPC Specs: Show details
- Gary
Stomping out the Rovi disease, one media center at a time. http://epg123.garyan2.net

Post#31 » Sun Apr 16, 2017 11:12 pm

garyan2 wrote:
rkulagow wrote:
Ladislaus wrote:Running 1.1.4; same error just occurred (as others have already reported):

Code: Select all
[4/16/2017 6:02:56 PM] [ERROR] Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.String[]' 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 '[1889].programs[18].videoProperties.0', line 1, position 8928187.


Is there a way to actually see what data is causing the error?

No, I don't save the errant response. In this case, it appears to be the same problem we had Friday with the videoProperties being a name:value instead of an array.

Note one of the reasons I don't save the response is the "position 8928187" where the error was at. The entire response is pretty big.

Is there anyway to just get the channels back, I only have like 4 channels in my guide now and i can't watch any TV atm.
bigjohns97
 
Posts: 30
Joined: 26 October 2012
HTPC Specs: Show details

Post#32 » Sun Apr 16, 2017 11:18 pm

bigjohns97 wrote:Is there anyway to just get the channels back, I only have like 4 channels in my guide now and i can't watch any TV atm.

I don't understand how you would have lost them in the first place, but you should be able to use the epg123Client GUI to import the last (yesterday's?) mxf file and see what happens.
User avatar
garyan2
 
Posts: 2055
Joined: 27 November 2015
HTPC Specs: Show details
- Gary
Stomping out the Rovi disease, one media center at a time. http://epg123.garyan2.net

Post#33 » Sun Apr 16, 2017 11:22 pm

garyan2 wrote:
bigjohns97 wrote:Is there anyway to just get the channels back, I only have like 4 channels in my guide now and i can't watch any TV atm.

I don't understand how you would have lost them in the first place, but you should be able to use the epg123Client GUI to import the last (yesterday's?) mxf file and see what happens.

the only mxf i have is really small like 10kb so whatever the problem is seems to overwrite the previous one that worked.
bigjohns97
 
Posts: 30
Joined: 26 October 2012
HTPC Specs: Show details

Post#34 » Sun Apr 16, 2017 11:26 pm

garyan2 wrote:
rkulagow wrote:
Ladislaus wrote:Running 1.1.4; same error just occurred (as others have already reported):

Code: Select all
[4/16/2017 6:02:56 PM] [ERROR] Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.String[]' 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 '[1889].programs[18].videoProperties.0', line 1, position 8928187.


Is there a way to actually see what data is causing the error?

No, I don't save the errant response. In this case, it appears to be the same problem we had Friday with the videoProperties being a name:value instead of an array.

Note one of the reasons I don't save the response is the "position 8928187" where the error was at. The entire response is pretty big.


Server side, everything was flushed out, and things appeared to be back to normal, so this is a headscratcher.

Is the JSON saved somewhere before you start processing it? Is position 8928187 just the byte location, so that if you open the file in Notepad++ you can just go to it and pull the text that's not deserializing?
rkulagow
 
Posts: 218
Joined: 19 July 2015
Location: Schedules Direct

Post#35 » Sun Apr 16, 2017 11:30 pm

rkulagow wrote:Is the JSON saved somewhere before you start processing it? Is position 8928187 just the byte location, so that if you open the file in Notepad++ you can just go to it and pull the text that's not deserializing?

Not saved. The response is in a memory stream to be lost once deserialized... buy yeah, if I save it, it will be at byte 8928187 where the error is.
User avatar
garyan2
 
Posts: 2055
Joined: 27 November 2015
HTPC Specs: Show details
- Gary
Stomping out the Rovi disease, one media center at a time. http://epg123.garyan2.net

Post#36 » Sun Apr 16, 2017 11:35 pm

Since I don't even have the stationID as a starting point, or the date, I can't really troubleshoot this. Users that opened tickets earlier this morning said they had data once again, so I assumed that the error was fixed; the schedules had been rebuilt, and caches had been flushed, so this is definitely a weird one.
rkulagow
 
Posts: 218
Joined: 19 July 2015
Location: Schedules Direct

Post#37 » Sun Apr 16, 2017 11:46 pm

Certainly understand. Based on the experience the last couple days, I'll work on ways to log information more inline with reporting problems to SD.
User avatar
garyan2
 
Posts: 2055
Joined: 27 November 2015
HTPC Specs: Show details
- Gary
Stomping out the Rovi disease, one media center at a time. http://epg123.garyan2.net

Post#38 » Sun Apr 16, 2017 11:47 pm

For anyone else having the issue I am with the JSON error and it wiping out all of your channels I was able to get the channels back by going through the guide options in WMC and checking the boxes for all of the channels again and clicking save.

I still don't have any guide data since I am still getting the JSON error but at least i can watch the NBA playoffs until this JSON error gets resolved.
bigjohns97
 
Posts: 30
Joined: 26 October 2012
HTPC Specs: Show details

Post#39 » Mon Apr 17, 2017 12:19 am

let me know if you guys need me to do anything to debug this JSON error, I have tried just selecting certain channels with no luck, the position number changes but I am still unable to provide the actual data where it is failing.
bigjohns97
 
Posts: 30
Joined: 26 October 2012
HTPC Specs: Show details

Post#40 » Mon Apr 17, 2017 12:25 am

bigjohns97 wrote:let me know if you guys need me to do anything to debug this JSON error, I have tried just selecting certain channels with no luck, the position number changes but I am still unable to provide the actual data where it is failing.

Let me know what your lineup is, and I'll find it. Right now, I'm looking at ways I can get my program to get the information for us automatically.
User avatar
garyan2
 
Posts: 2055
Joined: 27 November 2015
HTPC Specs: Show details
- Gary
Stomping out the Rovi disease, one media center at a time. http://epg123.garyan2.net

PreviousNext

Return to EPG123



Who is online

Users browsing this forum: No registered users and 1 guest

cron