<div dir="ltr"><div dir="ltr"><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 25, 2020 at 4:49 PM Jay Harbeston <<a href="mailto:jharbestonus@gmail.com">jharbestonus@gmail.com</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 style="overflow-wrap: break-word;"><br><div><br><blockquote type="cite"><div>On Aug 25, 2020, at 6:18 AM, Roland Ernst <<a href="mailto:rcrernst@gmail.com" target="_blank">rcrernst@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 25, 2020 at 11:48 AM Stephen Worthington <<a href="mailto:stephen_agent@jsw.gen.nz" target="_blank">stephen_agent@jsw.gen.nz</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">On Mon, 24 Aug 2020 13:25:27 -0400, you wrote:<br>
<br>
><br>
>Any ideas where I need to check? Or? <br>
><br><br></blockquote><div> </div><div>This seems to be a leftover from the python3 conversion<br>for mythtv v31+.<br><br>If the storage groups of the recording and video is local,<br>i.e.: on the same PC mythvidexport is running, please try<br>the following:<br><br>- locate the installed file mythproto.py from the Python<br>  Bindings (mine is in the location below)<br><br>- in terminal, run the following commands <br>  (change the path to mythproto.patch)<br> <br>{{{<br>$ cd /usr/lib/python3/dist-packages/MythTV/<br>$ ls ./mythproto.py<br>$ sudo cp ./mythproto.py ./<a href="http://mythproto.org/" target="_blank">mythproto.org</a><br>$ sudo patch < /path/to/mythproto.patch<br>$ sudo python3 -m compileall ./mythproto.py<br>}}}<br><br>Note, that this will be overwritten again when updating<br>mythtv.<br><br>Please report back the result.<br>On success, I will update the Python Bindings asap.</div></div></div></div></blockquote><br></div><div><br></div><div>I found earlier that I needed to add a ‘/‘ between the path and the file name to avoid the error below.  I tried setting the path with a leading ‘/‘ to avoid the issue, but that didn’t work as the ‘/‘ was stripped off earlier.  </div><div><br></div><div>    FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/mythtv/recordings44303_20200811220000.mp4’</div><div><br></div><br><div>I tweaked the open statement to put in +’/‘ immediately after the sg.dirname to add the ‘/‘  separator and it works great!</div><div><br></div><div>If you can add the directory separator into the code somewhere, all will be good!</div><div><br></div><div>Thanks!</div><div><br></div><div>Jay</div><div><br></div></div></blockquote><div><br></div><div><div>You are describing two different failures / bugs:</div><div><br></div><div>1) The trailing path separator is missing on some entries in the storagegroup :</div><div></div><div>Please post the output of <br></div><div>{{{</div><div>MariaDB [mythconverg]> select * from storagegroup;<br></div><div>}}}</div><div>Until v.30, all storage group entries had a trailing slash ('/') in the database.</div><div>My test setup for v31 shows a mixed scenario, with and without trailing slashes.</div><div>Everything was set up by the 'mythtv-setup' program, no direct sql edits. <br></div><div>This would affect all mythtv versions, regardless if they use python2 or python3.</div><div>Finding all occurrences of this missing separator inside the Python Bindings could be a lot of work.</div><div>I do not know if php/mythweb and perl bindings are affected here, too.<br></div><div>The correct python fix will be something like <br></div><div>{{{</div><div>os.path.join(sg.dirname, filename)</div><div>}}}<br></div> </div><div>2) Opening a file with the MythTV Python Bindings is not done in binary mode.</div><div>This only affects python3 and mythtv v31+ <br></div><div><br></div><div>Roland<br></div></div></div>