Issues with JSON + Mexico lineups

Issues relating to lineups should be posted here.

Issues with JSON + Mexico lineups

Postby Jabroni » Sun Apr 12, 2015 2:43 pm

Im trying to grab the lineup from Mexican providers, however ive tried several ZIP codes from within mexico and with the programs and they all return null lineups??

Heres the output of mfdb-json

Code: Select all

>2
Three-character ISO-3166-1 alpha3 country code (? to list available countries):>MEX
Enter postal code:>21100
********************************************
        Error response from server:
        Code:
        Message:
        Server:
********************************************

Status messages from Schedules Direct:
2015-03-23T18:47:00Z : Online : Lineup responses updated. See http://forums.schedulesdirect.org/viewtopic.php?f=17&t=2645&p=8379 for details.
Server: 20141201.web.1
Last data refresh: 2015-04-12T17:45:37Z
Account expires: 2015-04-17T03:34:45Z
Max number of headends for your account: 4


Hope you guys can help me out figuring out why I cant get any listing..

Thanks!
Jabroni
 
Posts: 13
Joined: Sun Apr 12, 2015 1:57 pm

Re: Issues with JSON + Mexico lineups

Postby rkulagow » Sun Apr 12, 2015 5:18 pm

Which version of the grabber are you using?

These are the lineups in that postal code:

[{
"type": "CABLE",
"device": "X",
"lineupId": "MEX-0004125-X",
"name": "Megacable, S.A. de C.V. (OTT) - Digital",
"mso": {
"id": "0000021",
"name": "Megacable, S.A. de C.V."
}
}, {
"type": "CABLE",
"device": "DEFAULT",
"lineupId": "MEX-0002345-DEFAULT",
"name": "Grupo Frecuencia Modulada Televisión, S.A. de C.V. - Cable",
"location": "Mexicali"
}, {
"type": "OTA",
"lineupId": "MEX-OTA21100",
"name": "Local Over the Air Broadcast"
}, {
"type": "CABLE",
"device": "DEFAULT",
"lineupId": "MEX-0002999-DEFAULT",
"name": "MVS Multivisión, S.A. de C.V. - Cable",
"location": "Mexicali"
}, {
"type": "CABLE",
"device": "DEFAULT",
"lineupId": "MEX-0000284-DEFAULT",
"name": "Telecable de Juarez, S.A. de C.V. (Cablemás) - Cable",
"location": "Mexicali",
"mso": {
"id": "0000010",
"name": "Cablemás - TV por Cable Nacional"
}
}, {
"type": "CABLE",
"device": "X",
"lineupId": "MEX-0000284-X",
"name": "Telecable de Juarez, S.A. de C.V. (Cablemás) - Digital",
"location": "Mexicali",
"mso": {
"id": "0000010",
"name": "Cablemás - TV por Cable Nacional"
}
}]
rkulagow
SD Staff
 
Posts: 883
Joined: Tue Aug 14, 2007 3:15 pm

Re: Issues with JSON + Mexico lineups

Postby Jabroni » Sun Apr 12, 2015 5:35 pm

Thanks for the update

My version was gotten from the GIT
Code: Select all
sd-utility.php utility program API:20141201 v0.25/2015-02-28


And do you know if there is a way to look up for a particular mexican satellite provider ?? Before there used to be a 'SKY Mexico' on the international zip codes.
Jabroni
 
Posts: 13
Joined: Sun Apr 12, 2015 1:57 pm

Re: Issues with JSON + Mexico lineups

Postby rkulagow » Sun Apr 12, 2015 5:59 pm

I'll need to troubleshoot tonight and see why you're not getting a valid response.
rkulagow
SD Staff
 
Posts: 883
Joined: Tue Aug 14, 2007 3:15 pm

Re: Issues with JSON + Mexico lineups

Postby Jabroni » Sun Apr 12, 2015 6:49 pm

Thanks again!

Just to help you a bit troubleshooting I just tested using POSTman and generating a manual post to the JSON WS

https://json.schedulesdirect.org/201412 ... code=21100
(with proper token on header)

Code: Select all
<html>
    <head>
        <title>Slim Application Error</title>
        <style>body{margin:0;padding:30px;font:12px/1.5 Helvetica,Arial,Verdana,sans-serif;}h1{margin:0;font-size:48px;font-weight:normal;line-height:48px;}strong{display:inline-block;width:65px;}</style>
    </head>
    <body>
        <h1>Slim Application Error</h1>
        <p>The application could not run because of the following error:</p>
        <h2>Details</h2>
        <div>
            <strong>Type:</strong> ErrorException
        </div>
        <div>
            <strong>Code:</strong> 8
        </div>
        <div>
            <strong>Message:</strong> Undefined index: location
        </div>
        <div>
            <strong>File:</strong> /var/www/html/functions/func.20141201.php
        </div>
        <div>
            <strong>Line:</strong> 483
        </div>
        <h2>Trace</h2>
        <pre>
            <div>#0 /var/www/html/functions/func.20141201.php(483): Slim\Slim::handleErrors(8, 'Undefined index...', '/var/www/html/f...', 483, Array)</div>
            <div>#1 /var/www/html/index.php(242): getHeadendsForPostalCode('MEX', '21100', '100863')</div>
            <div>#2 [internal function]: {closure}()</div>
            <div>#3 /var/www/html/vendor/slim/slim/Slim/Route.php(468): call_user_func_array(Object(Closure), Array)</div>
            <div>#4 /var/www/html/vendor/slim/slim/Slim/Slim.php(1338): Slim\Route->dispatch()</div>
            <div>#5 /var/www/html/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call()</div>
            <div>#6 /var/www/html/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()</div>
            <div>#7 /var/www/html/vendor/slim/slim/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()</div>
            <div>#8 /var/www/html/vendor/slim/slim/Slim/Slim.php(1283): Slim\Middleware\PrettyExceptions->call()</div>
            <div>#9 /var/www/html/index.php(921): Slim\Slim->run()</div>
            <div>#10 {main}
            </pre>
        </body>
    </html>



And I actually tried to use mfdb-json to manually add one of the stationsIDs you posted before and this is what I got:

Code: Select all
>1
Lineup to add>MEX-0000284-X
Sending request to server.
Message from server: Added lineup.

Status messages from Schedules Direct:
2015-03-23T18:47:00Z : Online : Lineup responses updated. See http://forums.schedulesdirect.org/viewtopic.php?f=17&t=2645&p=8379 for details.
Server: 20141201.web.1
Last data refresh: 2015-04-12T17:45:37Z
Account expires: 2015-04-17T03:34:45Z
Max number of headends for your account: 4
The following lineups are in your account at Schedules Direct:

┌──────┬────────────────────┬────────────────────┐
│Number│Lineup              │Server modified     │
├──────┼────────────────────┼────────────────────┤
│0     │MEX-0000284-X       │2015-04-13T02:01:16Z│
└──────┴────────────────────┴────────────────────┘
Checking for updated lineups from Schedules Direct.
Retrieving lineup MEX-0000284-X from Schedules Direct.
PHP Fatal error:  Call to a member function prepare() on a non-object in /home/aguzman/mfdb-json/sd-utility.php on line 1729
Jabroni
 
Posts: 13
Joined: Sun Apr 12, 2015 1:57 pm

Re: Issues with JSON + Mexico lineups

Postby rkulagow » Sun Apr 12, 2015 7:39 pm

The issue with the slim error that you saw is an upstream bug that I've opened a ticket against. There is supposed to be a "location" field specified in the response that I get, and nothing in the documentation indicates that it's optional, so it's a bug. I will try to create a workaround so that my code doesn't crash if I get bad data from our upstream.

The second issue with the mfdb-json is something that I need to look at.
rkulagow
SD Staff
 
Posts: 883
Joined: Tue Aug 14, 2007 3:15 pm

Re: Issues with JSON + Mexico lineups

Postby rkulagow » Sun Apr 12, 2015 8:02 pm

OK, the slim error should now be handled on the server side while I wait for an ACK from the upstream, or at least more information why certain responses don't have a location field.
rkulagow
SD Staff
 
Posts: 883
Joined: Tue Aug 14, 2007 3:15 pm

Re: Issues with JSON + Mexico lineups

Postby rkulagow » Sun Apr 12, 2015 8:06 pm

Can you give me the command line that you used to invoke sd-utility.php please? The error that you pasted indicates that you didn't get a db handle for the Schedules Direct table, so I need to determine why that happened.
rkulagow
SD Staff
 
Posts: 883
Joined: Tue Aug 14, 2007 3:15 pm

Re: Issues with JSON + Mexico lineups

Postby rkulagow » Sun Apr 12, 2015 8:13 pm

If you do a git pull first then if you encounter the same error then the script will dump the command line arguments so that I can see what I missed.
rkulagow
SD Staff
 
Posts: 883
Joined: Tue Aug 14, 2007 3:15 pm

Re: Issues with JSON + Mexico lineups

Postby Jabroni » Sun Apr 12, 2015 9:10 pm

The command Im trying to run is

/sd-utility.php --username=<user> --password=<pass> --nomyth --skiplogo
Jabroni
 
Posts: 13
Joined: Sun Apr 12, 2015 1:57 pm

Next

Return to Lineup Issues

Who is online

Users browsing this forum: No registered users and 3 guests

cron