﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
13468	mythfilldatabase reports misleading error when external grabber is not found	Martin Schwenke	stuartm	"When running mythfilldatabase it reported:

  2019-07-15 08:18:15.066124 E  tv_grab_au  --capabilities failed or we timed out waiting. You may need to upgrade your xmltv grabber                                                                               
  2019-07-15 08:18:15.066185 E  Grabbing XMLTV data using tv_grab_au is not supported. You may need to upgrade to the latest version of XMLTV.

However, the real problem was that the external grabber tv_grab_au was not in $PATH, so could not be found by mythfilldatabase.

I was moving my configuration/database to a new installation.  I have no idea how tv_grab_au was previously found on the old machine.  However, the above error message sent me in the wrong direction and wasted a couple of hours.

I notice that the relevant code in FillData::Run() is:

            if (grabber_capabilities_proc.Wait() != GENERIC_EXIT_OK)
                LOG(VB_GENERAL, LOG_ERR,
                    QString(""%1  --capabilities failed or we timed out waiting.""                            
                    "" You may need to upgrade your xmltv grabber"")
                        .arg(xmltv_grabber));
            else

Comparing this code to GrabberScript::run(), I can see that instead it would be possible to assign the return value to a variable and check for GENERIC_EXIT_CMD_NOT_FOUND.  Perhaps something like the following:

            uint status = grabber_capabilities_proc.Wait();

            if( status == GENERIC_EXIT_CMD_NOT_FOUND )
               LOG(VB_GENERAL, LOG_ERR,
                   QString(""xmltv grabber %1  not found"")
                        .arg(xmltv_grabber));
            else if( status != GENERIC_EXIT_OK )
                LOG(VB_GENERAL, LOG_ERR,
                    QString(""%1  --capabilities failed or we timed out waiting.""                            
                    "" You may need to upgrade your xmltv grabber"")
                        .arg(xmltv_grabber));
            else
"	Bug Report - General	closed	minor	needs_triage	MythTV - Mythfilldatabase	v30-fixes	medium	Trac EOL			0
