[mythtv-users] Rex: a new tv_grab_au script

Max Barry mythtv at maxbarry.com
Mon Aug 7 01:51:26 UTC 2006

Michael Cheshire wrote:
> Max,
> Great work on the script! Its good to see that it all continues :)
> I'm getting this wierd error :
> (in regards to the cache file?)
> Rex 1.2.0
> Unable to read cache file: /root/.rex/cache.dat.
> Not using cache.
> Grabbing data for days 1 - 5 into /var/local/foxguide.xml.
> Shows found: 1540.
> Saving cache.
> Writing XML.
> Rex 1.2.0 finished:
> 1540 shows grabbed
> 1713 downloads, including 1540 detail pages
> 0 cache hits, 0 failed detail pages, 64 stop times adjusted
> Time elapsed: 2 hr 46 min 38 sec
> can't create //.rex/cache.dat: No such file or directory at
> /usr/local/bin/rex line 277
> Rex 1.2.0
> Unable to read cache file: //.rex/cache.dat.
> Not using cache.
> Grabbing data for days 1 - 5 into /var/local/foxguide.xml.
> Shows found: 2152.
> ERROR! Failed to retrieve page:
> http://www.yourtv.com.au/guide/index.cfm?action=session_info&event_id=14957760&sid=6017789&loc=grid.
> Saving cache.
> Help?

Lots of weird stuff in there. For starters, Rex has run twice, so I
would look at what is kicking off your script. Maybe you're running it
too often, so it doesn't get a chance to finish before the new process
begins. Because everything up to and including "Time elapsed:" is what
you'd expect when running Rex for the first time.

Second, the first time it has run as root and the second time with no
environment (i.e. $ENV{HOME} is not set).  I don't know how that can
happen, but you'll have a nice cache file in /root/.rex/cache.dat which
the second process has ignored, causing lots of unnecessary downloads.
This also causes a failure to save the cache in the second process.

Third, it's weird that the first process found 1540 subscribed shows and
the second, which presumably ran at roughly the same time, found 2152.
So perhaps they are being pointed at different config files. Run version
1.2.1 to find out.

The "ERROR!" means one detail page didn't download. Not a big deal. A
transient network error, perhaps. That shouldn't have killed the script.

Despite all this you should have got your data, since none of the above
is fatal. Although if "Saving cache." was indeed the last output you
saw, that's weird, too.


More information about the mythtv-users mailing list