<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 28, 2020 at 4:37 PM Greg Woods <<a href="mailto:greg@gregandeva.net">greg@gregandeva.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I have recently moved to a new FE/BE combo system (MythTV v31 on Fedora 32). In the process, I have noticed a number of these errors from mythbackend:<div><br></div><div>Aug 28 08:08:25 <a href="http://seveneves.gregandeva.net" target="_blank">seveneves.gregandeva.net</a> mythbackend[34639]: 2020-08-28 08:08:25.478068 N [34639/34695] Expire autoexpire.cpp:633:SendDeleteMessages  Expiring 9418 MB for 1858 at 2015-11-20T18:00:00Z => "Christmas Comes Home to Canaan"<br>Aug 28 08:08:25 <a href="http://seveneves.gregandeva.net" target="_blank">seveneves.gregandeva.net</a> mythbackend[34639]: 2020-08-28 08:08:25.481925 E [34639/34639] CoreContext mainserver.cpp:3103:DoHandleDeleteRecording  MainServer: ERROR when trying to delete file: myth://<a href="http://mongoliad.gregandeva.net/1858_20151120173857.mpg" target="_blank">mongoliad.gregandeva.net/1858_20151120173857.mpg</a>. File doesn't exist.  Database metadata will not be removed<br></div><div><br></div><div>I checked, and ignoring the fact that "mongoliad" is the name of the old backend machine, the recording file does not in fact exist. So the next step is to run find_orphans.py (I just downloaded the latest version for v31 and above, python3-based as is my Fedora 32 system). But it crashes as follows:</div><div><br></div><div>[...long list of orphaned files...]]<br>  <a href="http://mongoliad.gregandeva.net" target="_blank">mongoliad.gregandeva.net</a>: The X-Files - Plus One                            1655_20180118020000.ts<br>  <a href="http://mongoliad.gregandeva.net" target="_blank">mongoliad.gregandeva.net</a>: The X-Files - This                                1655_20180111020000.ts<br>                                                                                  Count:         154<br>Are you sure you want to continue?<br>> yes<br>Traceback (most recent call last):<br>  File "/usr/local/bin/find_orphans.py", line 230, in <module><br>    main()<br>  File "/usr/local/bin/find_orphans.py", line 214, in main<br>    opt[1](opt[2])<br>  File "/usr/local/bin/find_orphans.py", line 129, in delete_recs<br>    rec.delete(True, True)<br>  File "/usr/lib/python3.8/site-packages/MythTV/dataheap.py", line 377, in delete<br>    return self.getProgram().delete(force, rerecord)<br>  File "/usr/lib/python3.8/site-packages/MythTV/mythproto.py", line 975, in delete<br>    res = int(be.deleteRecording(self, force=force))<br>  File "/usr/lib/python3.8/site-packages/MythTV/mythproto.py", line 671, in deleteRecording<br>    [command,program.toString()]))<br>  File "/usr/lib/python3.8/site-packages/MythTV/mythproto.py", line 965, in toString<br>    return BACKEND_SEP.join(self._deprocess())<br>  File "/usr/lib/python3.8/site-packages/MythTV/altdict.py", line 178, in _deprocess<br>    data[i] = self._inv_trans[self._field_type[i]](v)<br>  File "/usr/lib/python3.8/site-packages/MythTV/altdict.py", line 113, in <lambda><br>    lambda x: str(int(x.timestamp())),<br>  File "/usr/lib/python3.8/site-packages/MythTV/utility/dt.py", line 481, in timestamp<br>    return ((utc_naive - utc_epoch).total_seconds())<br>TypeError: can't subtract offset-naive and offset-aware datetimes<br></div><div><br></div><div>Has anyone else seen this (and better yet, have a patch to fix it)?</div><div><br></div><div>How serious are the mythbackend errors? As far as I can see, the system is working fine other than this, so it may be just cosmetic, but it does mean at least that there is some cruft in my database that it would be nice to get rid of.</div><div><br></div><div>As of now, I am nowhere near close to filling my recording storage directories, but I am afraid that when I do start to get close, the expire system may not actually be working correctly.</div><div><br></div><div>Thanks,</div><div>--Greg</div></div></blockquote><div><br></div><div>For changing the hostname properly, see<br></div><div><a href="https://www.mythtv.org/wiki/Database_Backup_and_Restore">https://www.mythtv.org/wiki/Database_Backup_and_Restore</a></div><div>section "Change the hostname of a MythTV frontend or backend"</div><div><br></div><div>For the utility "find_orphans.py", see the latest changes on <br></div><div><a href="https://www.mythtv.org/wiki/Find_orphans.py">https://www.mythtv.org/wiki/Find_orphans.py</a></div><div>and the forum entry</div><div><a href="https://forum.mythtv.org/viewtopic.php?f=6&t=3793">https://forum.mythtv.org/viewtopic.php?f=6&t=3793</a></div><div>Note: The mentioned bug (1) was fixed in June 2020.</div><div>Could you please update your installed version of mythtv?<br></div><div><br></div><div>(1) <a href="https://code.mythtv.org/trac/ticket/13622">#13622)</a></div><div><br></div><div>Roland<br></div><div><br></div><div><br></div><div><br> </div></div></div>