Failed to create MXF file error after update to 1.1.3

An evolving, supported alternative to Rovi
Forum rules
★ Download the latest EPG123 here: https://garyan2.github.io/ <> Setup guide here: https://garyan2.github.io/install.html
User avatar
12noon

Posts: 127
Joined: Mon Oct 06, 2014 4:23 pm
Location:

HTPC Specs: Show details

#21

Post by 12noon » 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.)
USA 60005
WOW Chicago Suburbs - Digital
USA-IL58819-X

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#22

Post by garyan2 » 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
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

Space

Posts: 2838
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#23

Post by Space » 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)...

iluvtofu

Posts: 2
Joined: Thu Apr 13, 2017 7:59 pm
Location:

HTPC Specs: Show details

#24

Post by iluvtofu » 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?

User avatar
12noon

Posts: 127
Joined: Mon Oct 06, 2014 4:23 pm
Location:

HTPC Specs: Show details

#25

Post by 12noon » 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: http://www.thegreenbutton.tv/forums/vie ... 18#p116518
USA 60005
WOW Chicago Suburbs - Digital
USA-IL58819-X

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#26

Post by garyan2 » 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.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

User avatar
Ladislaus

Posts: 91
Joined: Mon Jan 26, 2015 6:52 pm
Location: NJ

HTPC Specs: Show details

#27

Post by Ladislaus » 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.

stuartm

Posts: 721
Joined: Mon Nov 05, 2012 8:05 pm
Location: Longmont, CO

HTPC Specs: Show details

#28

Post by stuartm » 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

rkulagow

Posts: 246
Joined: Sun Jul 19, 2015 1:04 am
Location: Schedules Direct

HTPC Specs: Show details

#29

Post by rkulagow » 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?

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#30

Post by garyan2 » 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.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

bigjohns97

Posts: 32
Joined: Fri Oct 26, 2012 6:14 pm
Location:

HTPC Specs: Show details

#31

Post by bigjohns97 » 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.

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#32

Post by garyan2 » 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.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

bigjohns97

Posts: 32
Joined: Fri Oct 26, 2012 6:14 pm
Location:

HTPC Specs: Show details

#33

Post by bigjohns97 » 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.

rkulagow

Posts: 246
Joined: Sun Jul 19, 2015 1:04 am
Location: Schedules Direct

HTPC Specs: Show details

#34

Post by rkulagow » 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?

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#35

Post by garyan2 » 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.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

rkulagow

Posts: 246
Joined: Sun Jul 19, 2015 1:04 am
Location: Schedules Direct

HTPC Specs: Show details

#36

Post by rkulagow » 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.

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#37

Post by garyan2 » 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.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

bigjohns97

Posts: 32
Joined: Fri Oct 26, 2012 6:14 pm
Location:

HTPC Specs: Show details

#38

Post by bigjohns97 » 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: 32
Joined: Fri Oct 26, 2012 6:14 pm
Location:

HTPC Specs: Show details

#39

Post by bigjohns97 » 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.

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#40

Post by garyan2 » 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.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

Post Reply