<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 25, 2020, at 4:04 PM, Roland Ernst <<a href="mailto:rcrernst@gmail.com" class="">rcrernst@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><br class=""></div></div><br class=""><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" class="">jharbestonus@gmail.com</a>> wrote:<br class=""></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;" class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Aug 25, 2020, at 6:18 AM, Roland Ernst <<a href="mailto:rcrernst@gmail.com" target="_blank" class="">rcrernst@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""></div><br class=""><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" class="">stephen_agent@jsw.gen.nz</a>> wrote:<br class=""></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 class="">
<br class="">
><br class="">
>Any ideas where I need to check? Or? <br class="">
><br class=""><br class=""></blockquote><div class=""> </div><div class="">This seems to be a leftover from the python3 conversion<br class="">for mythtv v31+.<br class=""><br class="">If the storage groups of the recording and video is local,<br class="">i.e.: on the same PC mythvidexport is running, please try<br class="">the following:<br class=""><br class="">- locate the installed file mythproto.py from the Python<br class="">  Bindings (mine is in the location below)<br class=""><br class="">- in terminal, run the following commands <br class="">  (change the path to mythproto.patch)<br class=""> <br class="">{{{<br class="">$ cd /usr/lib/python3/dist-packages/MythTV/<br class="">$ ls ./mythproto.py<br class="">$ sudo cp ./mythproto.py ./<a href="http://mythproto.org/" target="_blank" class="">mythproto.org</a><br class="">$ sudo patch < /path/to/mythproto.patch<br class="">$ sudo python3 -m compileall ./mythproto.py<br class="">}}}<br class=""><br class="">Note, that this will be overwritten again when updating<br class="">mythtv.<br class=""><br class="">Please report back the result.<br class="">On success, I will update the Python Bindings asap.</div></div></div></div></blockquote><br class=""></div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">    FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/mythtv/recordings44303_20200811220000.mp4’</div><div class=""><br class=""></div><br class=""><div class="">I tweaked the open statement to put in +’/‘ immediately after the sg.dirname to add the ‘/‘  separator and it works great!</div><div class=""><br class=""></div><div class="">If you can add the directory separator into the code somewhere, all will be good!</div><div class=""><br class=""></div><div class="">Thanks!</div><div class=""><br class=""></div><div class="">Jay</div><div class=""><br class=""></div></div></blockquote><div class=""><br class=""></div><div class=""><div class="">You are describing two different failures / bugs:</div><div class=""><br class=""></div><div class="">1) The trailing path separator is missing on some entries in the storagegroup :</div><div class=""></div><div class="">Please post the output of <br class=""></div><div class="">{{{</div><div class="">MariaDB [mythconverg]> select * from storagegroup;<br class=""></div><div class="">}}}</div></div></div></div></div></blockquote><div><br class=""></div><div><div>mysql> select * from storagegroup;</div><div>+----+-------------+----------+------------------------------+</div><div>| id | groupname   | hostname | dirname                      |</div><div>+----+-------------+----------+------------------------------+</div><div>|  1 | Default     | mythpc   | /var/lib/mythtv/recordings   |</div><div>|  3 | Fanart      | mythpc   | /var/lib/mythtv/fanart/      |</div><div>|  4 | Trailers    | mythpc   | /var/lib/mythtv/trailers/    |</div><div>|  5 | Coverart    | mythpc   | /var/lib/mythtv/coverart/    |</div><div>|  7 | Screenshots | mythpc   | /var/lib/mythtv/screenshots/ |</div><div>|  8 | Banners     | mythpc   | /var/lib/mythtv/banners/     |</div><div>|  9 | DB Backups  | mythpc   | /var/lib/mythtv/db_backups/  |</div><div>| 10 | LiveTV      | mythpc   | /var/lib/mythtv/livetv/      |</div><div>| 11 | Streaming   | mythpc   | /var/lib/mythtv/streaming/   |</div><div>| 19 | Videos      | mythpc   | /var/lib/mythtv/videos/      |</div><div>+----+-------------+----------+------------------------------+</div><div>10 rows in set (0.00 sec)</div><div><br class=""></div><div>mysql> </div><div class=""><br class=""></div></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""><div class="">Until v.30, all storage group entries had a trailing slash ('/') in the database.</div><div class="">My test setup for v31 shows a mixed scenario, with and without trailing slashes.</div><div class="">Everything was set up by the 'mythtv-setup' program, no direct sql edits. <br class=""></div><div class="">This would affect all mythtv versions, regardless if they use python2 or python3.</div><div class="">Finding all occurrences of this missing separator inside the Python Bindings could be a lot of work.</div><div class="">I do not know if php/mythweb and perl bindings are affected here, too.<br class=""></div><div class="">The correct python fix will be something like <br class=""></div><div class="">{{{</div><div class="">os.path.join(sg.dirname, filename)</div><div class="">}}}<br class=""></div> </div><div class="">2) Opening a file with the MythTV Python Bindings is not done in binary mode.</div><div class="">This only affects python3 and mythtv v31+ <br class=""></div><div class=""><br class=""></div></div></div></div></blockquote><div><br class=""></div><div><br class=""></div>I can see now that the path needs to be updated for the default, and once I update the default path, </div><div> the current code with the mods for the binary, but without the +’/‘ should be fine.</div><div><br class=""></div><div>Thanks!</div><div><br class=""></div><div>Jay</div><div><br class=""></div></body></html>