Invalid username or token has expired

Use this forum to discuss issues related to the SD-JSON service.
Post Reply
acodring
Posts: 2
Joined: Fri May 22, 2020 2:04 pm

Invalid username or token has expired

Post by acodring »

Hi there,
I recently upgraded to 31 and thought all was well until last night when I ran out of schedule data.
Eventually I figured out that the old grabber is no longer supported and started flailing around trying to figure out which instructions to follow to migrate to XMLTV grabbers.

This section seemed to be the simplest, so I started down that path.
www.mythtv.org/wiki/XMLTV#Setup_with_tv_grab_zz_sdjson

Unfortunately the script isn't happy with me. Output below with urls mangled to get past post URL limits in this forum.
I can log in to schedulesdirect.org with the same username and password to view my old lineups so I don't understand why it's not happy with my username.

Any pointers where I'm going wrong?

Ubuntu 18.04; using mythtv 31 PPA;

acodring@mythbackend:~$ sudo --login --user=mythtv
[sudo] password for acodring:
$ whoami
mythtv
$ tv_find_grabbers | grep Schedules
/usr/bin/tv_grab_zz_sdjson_sqlite|Multinational (Schedules Direct JSON web services with SQLite DB)
/usr/bin/tv_grab_zz_sdjson|Schedules Direct JSON API

$ tv_grab_zz_sdjson --configure --config-file "$HOME/.mythtv/OTA HD JSON.xmltv"
Name "Params::Validate::NO_VALIDATION" used only once: possible typo at /usr/bin/tv_grab_zz_sdjson line 238.
Cache file for lineups, schedules and programs.
Cache file: [/home/mythtv/.xmltv/tv_grab_zz_sdjson.cache]
If you are migrating from a different grabber selecting an alternate channel ID format can make the migration easier.
Select channel ID format:
0: Default Format (eg: I12345.json.schedulesdirect.org)
1: tv_grab_na_dd Format (eg: I12345.labs.zap2it.com)
2: MythTV Internal DD Grabber Format (eg: 12345)
Select one: [0,1,2 (default=0)] 0
As the JSON data only includes the previously shown date normally the XML output should only have the date. However some programs such as older versions of MythTV also need a time.
Select previously shown format:
0: Date Only
1: Date And Time
Select one: [0,1 (default=0)] 0
Schedules Direct username.
Username: [redacted; SD account username is same as email address]
Schedules Direct password.
Password:
Use of uninitialized value in subroutine entry at /usr/bin/tv_grab_zz_sdjson line 408.
** POST STTH/json.schedulesdirect.org/20141201/token ==> 400 Bad Request (1s)
Server (ID=20141201.web.3 Time=2020-05-22T20:46:55Z) returned an error:
Invalid username or token has expired. (4003/INVALID_USER)
Retry in 10 seconds...
** POST STTH/json.schedulesdirect.org/20141201/token ==> 400 Bad Request
Server (ID=20141201.web.3 Time=2020-05-22T20:47:05Z) returned an error:
Invalid username or token has expired. (4003/INVALID_USER)
Retry in 10 seconds...
** POST STTH/json.schedulesdirect.org/20141201/token ==> 400 Bad Request
Server (ID=20141201.web.3 Time=2020-05-22T20:47:15Z) returned an error:
Invalid username or token has expired. (4003/INVALID_USER)
Retry count exceeded. at /usr/bin/tv_grab_zz_sdjson line 263.

rmeden
SD Board Member
Posts: 1569
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: Invalid username or token has expired

Post by rmeden »

hmmm lots of errors. You can grab the latest tv_grab_zz_sdjson from the XMLTV github page, but I would just try the tv_grab_zz_sdjson_sqlite. The two are pretty equivalent at this point.

Robert

acodring
Posts: 2
Joined: Fri May 22, 2020 2:04 pm

Re: Invalid username or token has expired

Post by acodring »

Thanks for the encouragement Robert.

I checked github and it seems I already have the latest greatest XMLTV package.

I followed instructions on the same wiki page (http://www.mythtv.org/wiki/XMLTV) for the sqlite version of the grabber and got through without errors.

Today it did it's first successful scheduled mythfilldatebase run.

Channel ids had changed a bit I guess, so I needed to tune up recording schedules, but that was straightforward.

Thanks again,
Andrew

Post Reply