Mailing List Archive

HDhomewrun
sometimes they are available - sometimes not. When I run the check script
from the terminal I see this:
aryl@trieli:/usr/local/bin$ sudo ./hdhomerun_check.py
[sudo] password for daryl:
Traceback (most recent call last):
File "/usr/local/bin/./hdhomerun_check.py", line 64, in <module>
main()
File "/usr/local/bin/./hdhomerun_check.py", line 31, in main
logging.basicConfig(filename='/tmp/hdhr_discovery.log',
File "/usr/lib/python3.10/logging/__init__.py", line 2040, in basicConfig
h = FileHandler(filename, mode,
File "/usr/lib/python3.10/logging/__init__.py", line 1169, in __init__
StreamHandler.__init__(self, self._open())
File "/usr/lib/python3.10/logging/__init__.py", line 1201, in _open
return open_func(self.baseFilename, self.mode,
PermissionError: [Errno 13] Permission denied: '/tmp/hdhr_discovery.log'
daryl@trieli:/usr/local/bin$

How do I correct this? TIA Daryl
Re: HDhomewrun [ In reply to ]
Hoi Daryl,

Friday, April 14, 2023, 1:20:22 AM, you wrote:

> sometimes they are available - sometimes not. When I run the check
> script from the terminal I see this:
> aryl@trieli:/usr/local/bin$ sudo ./hdhomerun_check.py
> [sudo] password for daryl:
> Traceback (most recent call last):
>   File "/usr/local/bin/./hdhomerun_check.py", line 64, in <module>
>     main()
>   File "/usr/local/bin/./hdhomerun_check.py", line 31, in main
>     logging.basicConfig(filename='/tmp/hdhr_discovery.log',
>   File "/usr/lib/python3.10/logging/__init__.py", line 2040, in basicConfig
>     h = FileHandler(filename, mode,
>   File "/usr/lib/python3.10/logging/__init__.py", line 1169, in __init__
>     StreamHandler.__init__(self, self._open())
>   File "/usr/lib/python3.10/logging/__init__.py", line 1201, in _open
>     return open_func(self.baseFilename, self.mode,
> PermissionError: [Errno 13] Permission denied: '/tmp/hdhr_discovery.log'
> daryl@trieli:/usr/local/bin$



> How do I correct this?     TIA  Daryl

My guess is that you have run this script as different users. It looks
like a bug in the script that does not anticipate this.
It can not write to the file: '/tmp/hdhr_discovery.log', so remove it,
if needed with sudo and try the script again.

If this indeed is the problem, the script should set world permissions
to the file to rw.


Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDhomewrun [ In reply to ]
Hoi Daryl,

Friday, April 14, 2023, 1:37:29 AM, you wrote:

> Hoi Daryl,

> Friday, April 14, 2023, 1:20:22 AM, you wrote:

>> sometimes they are available - sometimes not. When I run the check
>> script from the terminal I see this:
>> aryl@trieli:/usr/local/bin$ sudo ./hdhomerun_check.py
>> [sudo] password for daryl:
>> Traceback (most recent call last):
>>   File "/usr/local/bin/./hdhomerun_check.py", line 64, in <module>
>>     main()
>>   File "/usr/local/bin/./hdhomerun_check.py", line 31, in main
>>     logging.basicConfig(filename='/tmp/hdhr_discovery.log',
>>   File "/usr/lib/python3.10/logging/__init__.py", line 2040, in basicConfig
>>     h = FileHandler(filename, mode,
>>   File "/usr/lib/python3.10/logging/__init__.py", line 1169, in __init__
>>     StreamHandler.__init__(self, self._open())
>>   File "/usr/lib/python3.10/logging/__init__.py", line 1201, in _open
>>     return open_func(self.baseFilename, self.mode,
>> PermissionError: [Errno 13] Permission denied: '/tmp/hdhr_discovery.log'
>> daryl@trieli:/usr/local/bin$



>> How do I correct this?     TIA  Daryl

> My guess is that you have run this script as different users. It looks
> like a bug in the script that does not anticipate this.
> It can not write to the file: '/tmp/hdhr_discovery.log', so remove it,
> if needed with sudo and try the script again.

> If this indeed is the problem, the script should set world permissions
> to the file to rw.

If the script reuses the file you could fix it by manually setting the
word permissions on that file to rw. If it deletes and recreates the
file the script needs fixing.


Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDhomewrun [ In reply to ]
daryl@trieli:/usr/local/bin$ sudo rm /tmp/hdhr_discovery.log
[sudo] password for daryl:
daryl@trieli:/usr/local/bin$ sudo ./hdhomerun_check.py
daryl@trieli:/usr/local/bin$

Does this now indicate a successful run of the script?

On Thu, Apr 13, 2023 at 7:54?PM Hika van den Hoven <hikavdh@gmail.com>
wrote:

> Hoi Daryl,
>
> Friday, April 14, 2023, 1:37:29 AM, you wrote:
>
> > Hoi Daryl,
>
> > Friday, April 14, 2023, 1:20:22 AM, you wrote:
>
> >> sometimes they are available - sometimes not. When I run the check
> >> script from the terminal I see this:
> >> aryl@trieli:/usr/local/bin$ sudo ./hdhomerun_check.py
> >> [sudo] password for daryl:
> >> Traceback (most recent call last):
> >> File "/usr/local/bin/./hdhomerun_check.py", line 64, in <module>
> >> main()
> >> File "/usr/local/bin/./hdhomerun_check.py", line 31, in main
> >> logging.basicConfig(filename='/tmp/hdhr_discovery.log',
> >> File "/usr/lib/python3.10/logging/__init__.py", line 2040, in
> basicConfig
> >> h = FileHandler(filename, mode,
> >> File "/usr/lib/python3.10/logging/__init__.py", line 1169, in __init__
> >> StreamHandler.__init__(self, self._open())
> >> File "/usr/lib/python3.10/logging/__init__.py", line 1201, in _open
> >> return open_func(self.baseFilename, self.mode,
> >> PermissionError: [Errno 13] Permission denied: '/tmp/hdhr_discovery.log'
> >> daryl@trieli:/usr/local/bin$
>
>
>
> >> How do I correct this? TIA Daryl
>
> > My guess is that you have run this script as different users. It looks
> > like a bug in the script that does not anticipate this.
> > It can not write to the file: '/tmp/hdhr_discovery.log', so remove it,
> > if needed with sudo and try the script again.
>
> > If this indeed is the problem, the script should set world permissions
> > to the file to rw.
>
> If the script reuses the file you could fix it by manually setting the
> word permissions on that file to rw. If it deletes and recreates the
> file the script needs fixing.
>
>
> Tot mails,
> Hika mailto:hikavdh@gmail.com
>
> "Zonder hoop kun je niet leven
> Zonder leven is er geen hoop
> Het eeuwige dilemma
> Zeker als je hoop moet vernietigen om te kunnen overleven!"
>
> De lerende Mens
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
Re: HDhomewrun [ In reply to ]
On Thursday 13 April 2023 08:36:54 PM (-05:00), Daryl McDonald wrote:


daryl@trieli:/usr/local/bin$ sudo rm /tmp/hdhr_discovery.log
[sudo] password for daryl:
daryl@trieli:/usr/local/bin$ sudo ./hdhomerun_check.py
daryl@trieli:/usr/local/bin$



Does this now indicate a successful run of the script?




Looks like something I wrote long ago. It was intended to be run ONLY by
user mythtv. There was a comment at the beginning of the script that said
as much.


The exit code would be 0 for success. The log has the actual output.
Exit codes are documented in the beginning of the program.


But, here a current copy that prints to the terminal if run there. It
still logs to the file when run from mythtv-backend.service, *for example*.


https://pastebin.com/wdrdTrfV

--
Bill
Re: HDhomewrun [ In reply to ]
On Thu, Apr 13, 2023 at 9:53?PM Bill Meek <keemllib@gmail.com> wrote:

> On Thursday 13 April 2023 08:36:54 PM (-05:00), Daryl McDonald wrote:
>
> daryl@trieli:/usr/local/bin$ sudo rm /tmp/hdhr_discovery.log
> [sudo] password for daryl:
> daryl@trieli:/usr/local/bin$ sudo ./hdhomerun_check.py
> daryl@trieli:/usr/local/bin$
>
> Does this now indicate a successful run of the script?
>
>
>
> Looks like something I wrote long ago. It was intended to be run ONLY by
> user mythtv. There was a comment at the beginning of the script that said
> as much.
>
> The exit code would be 0 for success. The log has the actual output.
> Exit codes are documented in the beginning of the program.
>
> But, here a current copy that prints to the terminal if run there. It
> still logs to the file when run from mythtv-backend.service, *for example*.
>
> https://pastebin.com/wdrdTrfV
>
> --
> Bill
>
> Bill, I've been using your hdhomerun_check.py version 1.14 for a while
with success for both networked HDHRs and Local-Linked HDHRs.

Any reason I should change over to this new 1.28 version?

Jim A