Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#12947 closed Bug Report - General (Fixed)

rec.update() not working in transcode-h264.py user job

Reported by: craig@… Owned by: Roger Siddons
Priority: minor Milestone: 0.28.2
Component: MythTV - General Version: 0.28.0
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I too have tripped across the bug documented in the following tread, I don’t know if it has been officially filed or not. https://forum.mythtv.org/viewtopic.php?f=2&t=1205&start=15

I recently upgraded to Ubuntu 16.04 and mythtv v0.28 v0.28-98-g0890206 from Ubuntu 14.04 and mythtv 0.27. The upgrade went smoothly, except my user job stopped working. My job is similar to transcode-h264.py located here: https://www.mythtv.org/wiki/Transcode_Mpeg2_to_H264

The script stops at the rec.update() command will an error. I hacked the script with the following workaround suggested by the forum posting and it now runs. . . #the following line is hack to fix this bug https://forum.mythtv.org/viewtopic.php?f=2&t=1205 rec.bookmarkupdate=starttime . rec.update() . .

Interacting with python directly gives the exact point of failure craig-nuc.craig 4098> python Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information.

from MythTV import Job, Recorded, System, MythDB, findfile, MythError?, MythLog?, datetime from optparse import OptionParser? from glob import glob from shutil import copyfile import sys import os import errno import time db = MythDB() job = Job(2057, db=db) chanid = job.chanid starttime = job.starttime rec = Recorded((chanid, starttime), db=db) rec.update()

Traceback (most recent call last):

File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/MythTV/database.py", line 429, in update

self._push()

File "/usr/lib/python2.7/dist-packages/MythTV/dataheap.py", line 351, in _push

DBDataWrite._push(self)

File "/usr/lib/python2.7/dist-packages/MythTV/database.py", line 408, in _push

% (self._table, format_string, self._where), sql_values)

File "/usr/lib/python2.7/dist-packages/MythTV/_conn_mysqldb.py", line 71, in execute

raise MythDBError(MythDBError.DB_RAW, e.args)

MythTV.exceptions.MythDBError: MySQL error 1292: Incorrect datetime value: '0' for column 'bookmarkupdate' at row 1

Has this bug been filed? I look forward to removing the hack from my user job.

craig-nuc.craig 4082> mythbackend --version Please attach all output as a file in bug reports. MythTV Version : v0.28-98-g0890206 MythTV Branch : fixes/0.28 Network Protocol : 88 Library API : 0.28.20161120-1 QT Version : 5.5.1 Options compiled in:

linux profile use_hidesyms using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_crystalhd using_dvb using_firewire using_frontend using_hdhomerun using_vbox using_ceton using_hdpvr using_ivtv using_joystick_menu using_libcec using_libcrypto using_libdns_sd using_libfftw3 using_libxml2 using_lirc using_mheg using_opengl using_opengl_video using_opengl_themepainter using_qtwebkit using_qtscript using_qtdbus using_sdl using_taglib using_v4l2 using_x11 using_xrandr using_xv using_profiletype using_bindings_perl using_bindings_python using_bindings_php using_freetype2 using_mythtranscode using_opengl using_vaapi using_vdpau using_ffmpeg_threads using_mheg using_libass using_libxml2

Attachments (2)

pythonlog.txt (1.3 KB) - added by craig@… 3 years ago.
python log
Bug.rtf (3.8 KB) - added by craig@… 3 years ago.
original bug description

Download all attachments as: .zip

Change History (9)

Changed 3 years ago by craig@…

Attachment: pythonlog.txt added

python log

Changed 3 years ago by craig@…

Attachment: Bug.rtf added

original bug description

comment:1 Changed 3 years ago by craig@…

The ticket formatter changed the look of the bug that I pasted into the system. The original data is in the Bug.rtf attachment.

comment:2 Changed 3 years ago by Stuart Auchterlonie

Milestone: unknown0.28.1

comment:3 Changed 3 years ago by Stuart Auchterlonie

Milestone: 0.28.10.28.2

Moving remaining open 0.28.1 tickets to 0.28.2

comment:4 Changed 3 years ago by seven@…

I had similar issues when upgrading from 14.04 to 16.04 with silence.py however both were 0.28, I believe the issue is related to the upgraded mysql server (5.7) in 16.04. silence.py was upgraded last year to resolve the issue

https://www.mythtv.org/wiki/Commercial_detection_with_silences

Diff can be found here

https://www.mythtv.org/wiki?title=Commercial_detection_with_silences&diff=63814&oldid=63789

comment:5 Changed 2 years ago by Roger Siddons

In 2d247dc4600cc11166f056f48058f74252a27419:

Python: Fix bookmarkupdate error

Python scripts updating a recording with no bookmark elicit: Failed due to: "MySQL error 1292: Incorrect datetime value: '0' for column 'bookmarkupdate' at row 1"

The bindings use a default of 0, which is rejected by newer MySQL versions

(cherry picked from commit 37ef0fa91e7fdffb0edccec288b00471c60f2148)

Last edited 2 years ago by Roger Siddons (previous) (diff)

comment:6 Changed 2 years ago by Roger Siddons

Resolution: Fixed
Status: newclosed

Setting the bookmarkupdate time without setting a valid bookmark is highly discouraged as it may confuse Myth. Technically it's an invalid state, which may cause future (obscure) issues related to preview generation or playback.

comment:7 Changed 2 years ago by Roger Siddons

Owner: set to Roger Siddons
Note: See TracTickets for help on using tickets.