v17 Unable to add keyword timer 'starttime' cannot be null
#1
Hi guys,

I have a mythtv backend (0.28+fixes) on Ubuntu (16.04 LTS) and MySQL server.  I have Kodi 17.6 on Nvidia Shield TV with Mythtv PVR addon.  I have only just set up the PVR addon a few days ago and generally it has been working fine.  However, SWMBO wanted to record something that starts a few weeks from now, so I tried adding a manual timer using keywords.  I tried a few times and all the options are there to do it, however, Kodi silently ignores any attempt to add a keyword recording.

I went to the backend and checked the log to find:

Jan 13 14:40:05 zzz mythbackend: mythbackend[802]: E HttpServer65 mythdb.cpp:183 (DBError) DB Error (UPDATE/INSERT record):#012Query was:#012INSERT INTO record SET type = ?, search = ?, recpriority = ?, prefinput = ?, startoffset = ?, endoffset = ?, dupmethod = ?, dupin = ?, filter = ?, inactive = ?, profile = ?, recgroup = ?, recgroupid = ?, storagegroup = ?, playgroup = ?, autoexpire = ?, maxepisodes = ?, maxnewest = ?, autocommflag = ?, autotranscode = ?, transcoder = ?, autouserjob1 = ?, autouserjob2 = ?, autouserjob3 = ?, autouserjob4 = ?, autometadata = ?, parentid = ?, title = ?, subtitle = ?, season = ?, episode = ?, description = ?, category = ?, starttime = ?, startdate = ?, endtime = ?, enddate = ?, seriesid = ?, programid = ?, inetref = ?, chanid = ?, station = ?, findday = ?, findtime = ?, findid = ?, next_record = ?, last_record = ?, last_delete = ?, avg_delay = ? ;#012Bindings were:#012:AUTOCOMMFLAG=false, :AUTOEXPIRE=false, :AUTOMETADATA=false,#012:AUTOTRANSCODE=false, :AUTOUSERJOB1=false, :AUTOUSERJOB2=false,#012:AUTOUSERJOB3=false, :AUTOUSERJOB4=false, :AVGDELAY=100, :CATEGORY="", :CHANID=0,#012Big GrinESCRIPTION="My Kitchen Rules", Big GrinUPIN=15, Big GrinUPMETHOD=2, :ENDDATE=NULL,#012:ENDOFFSET=10, :ENDTIME=NULL, :EPISODE=0, :FILTER=0, :FINDDAY=5, :FINDID=737072,#012:FINDTIME=10:00:00, :INACTIVE=false, :INETREF="", :INPUT=0, :LASTDELETE=NULL,#012:LASTREC=NULL, :MAXEPISODES=0, :MAXNEWEST=false, :NEXTREC=NULL, TongueARENTID=0,#012TongueLAYGROUP="Default", TongueROGRAMID="", :RECGROUP="Default", :RECGROUPID=1,#012:RECPRIORITY=0, :RECPROFILE="Default", :SEARCHTYPE=3, :SEASON=0, :SERIESID="",#012:STARTDATE=NULL, :STARTOFFSET=5, :STARTTIME=NULL, :STATION="",#012:STORAGEGROUP="Default", :SUBTITLE="", :TITLE="MKR", :TRANSCODER=0, :TYPE=4#012Driver error was [2/1048]:#012QMYSQL3: Unable to execute statement#012Database error was:#012Column 'starttime' cannot be null

Checking with MSQL, the "record table" has 'starttime' as part of an index.

As far as I can tell, with a recording 'type' of '4' any starttime-startdate is ok, but both fields must be present.  I am guessing that the addon is not passing these values.  I used the mythtv client to add a similar recording and it used the current date & time for these fields.

I am assuming this is a bug.  I did a search in this forum and did not find a similar issue, however, I apologise if this is a duplicate. 

thanks,

Ron
Reply
#2
Please provide any type of logs via Pastebin.com or similar text upload files, and paste their URL links in this forum.
We do prefer FULL logs. Problems/bugs can start at any moment in the Kodi or MythTV process.
Your "log" is simply not very illegible.
Reply
#3
Ok, its one line from mythbackend log - and its the only relevant line.  There is nothing in Kodi log. 

You could cut and paste into notepad++ and see the details better as your website word-wraps - as does pastebin. 

However, it cant be too hard to check the "record by keyword" function  and it seems obvious to me that the start time and date params are not initialised.  And I can understand why, as they should not be needed as they are irrelevant.  In many ways you could argue that it is a bug in the mythbackend API as it should initialise those params.  
   
Pastebin Log Line

Anyway, it seems that you can achieve the same recording outcome by using the "record all" option and putting in a search term there, so its probably not a big deal.  But then, why have an option that doesn't work?  

In case it may make it more very illegible as requested:
Quote:Jan 13 14:40:05 zzz mythbackend: mythbackend[802]: E HttpServer65 mythdb.cpp:183 (DBError) DB Error (UPDATE/INSERT record):#012Query was:#012INSERT INTO record SET type = ?, search = ?, recpriority = ?, prefinput = ?, startoffset = ?, endoffset = ?, dupmethod = ?, dupin = ?, filter = ?, inactive = ?, profile = ?, recgroup = ?, recgroupid = ?, storagegroup = ?, playgroup = ?, autoexpire = ?, maxepisodes = ?, maxnewest = ?, autocommflag = ?, autotranscode = ?, transcoder = ?, autouserjob1 = ?, autouserjob2 = ?, autouserjob3 = ?, autouserjob4 = ?, autometadata = ?, parentid = ?, title = ?, subtitle = ?, season = ?, episode = ?, description = ?, category = ?, starttime = ?, startdate = ?, endtime = ?, enddate = ?, seriesid = ?, programid = ?, inetref = ?, chanid = ?, station = ?, findday = ?, findtime = ?, findid = ?, next_record = ?, last_record = ?, last_delete = ?, avg_delay = ? ;#012Bindings were:#012:AUTOCOMMFLAG=false, :AUTOEXPIRE=false, :AUTOMETADATA=false,#012:AUTOTRANSCODE=false, :AUTOUSERJOB1=false, :AUTOUSERJOB2=false,#012:AUTOUSERJOB3=false, :AUTOUSERJOB4=false, :AVGDELAY=100, :CATEGORY="", :CHANID=0,#012: DESCRIPTION="My Kitchen Rules", :DUPIN=15, :DUPMETHOD=2, :ENDDATE=NULL,#012:ENDOFFSET=10, :ENDTIME=NULL, :EPISODE=0, :FILTER=0, :FINDDAY=5, :FINDID=737072,#012:FINDTIME=10:00:00, :INACTIVE=false, :INETREF="", :INPUT=0, :LASTDELETE=NULL,#012:LASTREC=NULL, :MAXEPISODES=0, :MAXNEWEST=false, :NEXTREC=NULL, :PARENTID=0,#012:PLAYGROUP="Default", :PROGRAMID="", :RECGROUP="Default", :RECGROUPID=1,#012:RECPRIORITY=0, :RECPROFILE="Default", :SEARCHTYPE=3, :SEASON=0, :SERIESID="",#012:STARTDATE=NULL, :STARTOFFSET=5, :STARTTIME=NULL, :STATION="",#012:STORAGEGROUP="Default", :SUBTITLE="", :TITLE="MKR", :TRANSCODER=0, :TYPE=4#012Driver error was [2/1048]:#012QMYSQL3: Unable to execute statement#012Database error was:#012Column 'starttime' cannot be null
Ron
Reply
#4
Thanks for reporting this issue. I will check this soon.
Reply
#5
Trying the case, I can't reproduce the issue. Also I checked the table "record" from the backend database and those columns "startdate" "starttime" can be null. See below:

mysql> desc record;
+---------------+------------------+------+-----+----------+----------------+
| Field         | Type             | Null | Key | Default  | Extra          |
+---------------+------------------+------+-----+----------+----------------+
| recordid      | int(10) unsigned | NO   | PRI | NULL     | auto_increment |
| type          | int(10) unsigned | NO   | MUL | 0        |                |
| chanid        | int(10) unsigned | YES  | MUL | NULL     |                |
| starttime     | time             | YES  |     | NULL     |                |
| startdate     | date             | YES  |     | NULL     |                |

| endtime       | time             | YES  |     | NULL     |                |
| enddate       | date             | YES  |     | NULL     |                |


Is your database corrupted or customized ?
My database is version 1348 (MythTV backend 29), and the NULL flag has been placed for this lastest release. So your database is right, and the issue exists with MythTV backend before 29.0. So to fix it quiickly you can upgrade your backend to the lastest (29.0).
Reply
#6
I updated the addon for backend <= 0.28. The next nightly build should contains the fix.
Reply
#7
(2018-02-23, 22:21)janbar Wrote: I updated the addon for backend <= 0.28. The next nightly build should contains the fix.
 thank you.
Reply

Logout Mark Read Team Forum Stats Members Help
Unable to add keyword timer 'starttime' cannot be null0