2014-04-22, 19:58
Hello,
I used to use raspbmc with hyperion and the following script to enable/disable hyperion with my usb remote:
Now im using Openelec and installed hyperion, which works, but the script gives me back an error. I checked the log and this is what it shows:
Now it seems that it can find a file and from the script is probably initctl and i have searched for that file/directory so i could change the path on the script but i can't find it =/
Anyone knows how to fix this error or what change can i try to make on the script to make this work?
Thank you![/quote]
I used to use raspbmc with hyperion and the following script to enable/disable hyperion with my usb remote:
Code:
import subprocess
hyperionStatus = subprocess.Popen(["/sbin/initctl", "status", "hyperion"], stdout=subprocess.PIPE).communicate()[0]
print "Current status: ", hyperionStatus
if ('running' in hyperionStatus):
hyperionStatus = subprocess.Popen(["/sbin/initctl", "stop", "hyperion"], stdout=subprocess.PIPE).communicate()[0]
else:
hyperionStatus = subprocess.Popen(["/sbin/initctl", "start", "hyperion"], stdout=subprocess.PIPE).communicate()[0]
print "New status: ", hyperionStatus
Now im using Openelec and installed hyperion, which works, but the script gives me back an error. I checked the log and this is what it shows:
Code:
20:44:08 T:2732581984 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.OSError'>
Error Contents: [Errno 2] No such file or directory
Traceback (most recent call last):
File "/storage/startstophyperion.py", line 3, in <module>
hyperionStatus = subprocess.Popen(["/sbin/initctl", "status", "hyperion"], stdout=subprocess.PIPE).communicate()[0]
File "./Lib/subprocess.py", line 679, in __init__
File "./Lib/subprocess.py", line 1249, in _execute_child
OSError: [Errno 2] No such file or directory
-->End of Python script error report<--
Now it seems that it can find a file and from the script is probably initctl and i have searched for that file/directory so i could change the path on the script but i can't find it =/
Anyone knows how to fix this error or what change can i try to make on the script to make this work?
Thank you![/quote]