Failed to create MXF file error after update to 1.1.3
Forum rules
★ Download the latest EPG123 here: https://garyan2.github.io/ <> Setup guide here: https://garyan2.github.io/install.html ★
★ Download the latest EPG123 here: https://garyan2.github.io/ <> Setup guide here: https://garyan2.github.io/install.html ★
- 12noon
- Posts: 127
- Joined: Mon Oct 06, 2014 4:23 pm
- Location:
- HTPC Specs:
Yeah, 50% sounds about right. 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.)
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
WOW Chicago Suburbs - Digital
USA-IL58819-X
- garyan2
- Posts: 7480
- Joined: Fri Nov 27, 2015 7:23 pm
- Location:
- HTPC Specs:
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+
By the way, VS2015 counted the lines for me ... currently 5700+
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io
Keeping WMC alive beyond January 2020. https://garyan2.github.io
-
- Posts: 2840
- Joined: Sun Jun 02, 2013 9:44 pm
- Location:
- HTPC Specs:
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)...
-
- Posts: 2
- Joined: Thu Apr 13, 2017 7:59 pm
- Location:
- HTPC Specs:
So does anyone encountering this issue have to contact SD individually or are they doing a general fix?
- 12noon
- Posts: 127
- Joined: Mon Oct 06, 2014 4:23 pm
- Location:
- HTPC Specs:
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! (And, of course, thanks to garyan2 for making it possible.)
REF: http://www.thegreenbutton.tv/forums/vie ... 18#p116518rkulagow 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.
USA 60005
WOW Chicago Suburbs - Digital
USA-IL58819-X
WOW Chicago Suburbs - Digital
USA-IL58819-X
- garyan2
- Posts: 7480
- Joined: Fri Nov 27, 2015 7:23 pm
- Location:
- HTPC Specs:
What 12noon said. I just wanted to chime in and say I love the Kung Fu Panda reference in your handle! I can't read it without hearing it.iluvtofu wrote:So does anyone encountering this issue have to contact SD individually or are they doing a general fix?
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io
Keeping WMC alive beyond January 2020. https://garyan2.github.io
- Ladislaus
- Posts: 91
- Joined: Mon Jan 26, 2015 6:52 pm
- Location: NJ
- HTPC Specs:
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.
-
- Posts: 723
- Joined: Mon Nov 05, 2012 8:05 pm
- Location: Longmont, CO
- HTPC Specs:
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
-
- Posts: 246
- Joined: Sun Jul 19, 2015 1:04 am
- Location: Schedules Direct
- HTPC Specs:
Is there a way to actually see what data is causing the error?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.
- garyan2
- Posts: 7480
- Joined: Fri Nov 27, 2015 7:23 pm
- Location:
- HTPC Specs:
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.rkulagow wrote:Is there a way to actually see what data is causing the error?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.
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
Keeping WMC alive beyond January 2020. https://garyan2.github.io
-
- Posts: 32
- Joined: Fri Oct 26, 2012 6:14 pm
- Location:
- HTPC Specs:
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.garyan2 wrote: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.rkulagow wrote:Is there a way to actually see what data is causing the error?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.
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.
- garyan2
- Posts: 7480
- Joined: Fri Nov 27, 2015 7:23 pm
- Location:
- HTPC Specs:
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.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.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io
Keeping WMC alive beyond January 2020. https://garyan2.github.io
-
- Posts: 32
- Joined: Fri Oct 26, 2012 6:14 pm
- Location:
- HTPC Specs:
the only mxf i have is really small like 10kb so whatever the problem is seems to overwrite the previous one that worked.garyan2 wrote: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.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.
-
- Posts: 246
- Joined: Sun Jul 19, 2015 1:04 am
- Location: Schedules Direct
- HTPC Specs:
Server side, everything was flushed out, and things appeared to be back to normal, so this is a headscratcher.garyan2 wrote: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.rkulagow wrote:Is there a way to actually see what data is causing the error?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.
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 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?
- garyan2
- Posts: 7480
- Joined: Fri Nov 27, 2015 7:23 pm
- Location:
- HTPC Specs:
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.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?
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io
Keeping WMC alive beyond January 2020. https://garyan2.github.io
-
- Posts: 246
- Joined: Sun Jul 19, 2015 1:04 am
- Location: Schedules Direct
- HTPC Specs:
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.
- garyan2
- Posts: 7480
- Joined: Fri Nov 27, 2015 7:23 pm
- Location:
- HTPC Specs:
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
Keeping WMC alive beyond January 2020. https://garyan2.github.io
-
- Posts: 32
- Joined: Fri Oct 26, 2012 6:14 pm
- Location:
- HTPC Specs:
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.
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.
-
- Posts: 32
- Joined: Fri Oct 26, 2012 6:14 pm
- Location:
- HTPC Specs:
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.
- garyan2
- Posts: 7480
- Joined: Fri Nov 27, 2015 7:23 pm
- Location:
- HTPC Specs:
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.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.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io
Keeping WMC alive beyond January 2020. https://garyan2.github.io