<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 25, 2020 at 10: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 4:04 PM, 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></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" target="_blank">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><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></div></div></div></blockquote><div><br></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></div><div>mysql> </div><div><br></div></div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_quote"><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></div></div></blockquote><div><br></div><div><br></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></div><div>Thanks!</div><div><br></div><div>Jay</div><div><br></div></div></blockquote><div><br></div><div>Jay,</div><div><br></div><div>I have a mixed set of paths in my storage group table as well, and I did a fresh install.</div><div> So I need to investigate this further.</div><div><br></div><div>Anyway, I've created a patch that should work with and without trailing slashes.</div><div><br></div><div>Could you please try this patch?</div><div><br></div><div>Thx</div><div>Roland</div><div><br></div></div></div>