Hallo,
habe jetzt nochmal das Python und das Script neu installiert. Jetzt erhalte ich folgende Fehlermeldung:
13:35:56 T:4828 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.WindowsError'>
Error Contents: [Error 193] %1 ist keine zul�ssige Win32-Anwendung
Traceback (most recent call last):
File "C:\Users\media\AppData\Roaming\XBMC\addons\service.xbmc.callbacks-0.2\default.py", line 186, in <module>
Main()
File "C:\Users\media\AppData\Roaming\XBMC\addons\service.xbmc.callbacks-0.2\default.py", line 53, in __init__
subprocess.Popen([script_xbmc_starts])
File "C:\Program Files (x86)\XBMC\system\python\Lib\subprocess.py", line 623, in __init__
errread, errwrite)
File "C:\Program Files (x86)\XBMC\system\python\Lib\subprocess.py", line 833, in _execute_child
startupinfo)
WindowsError: [Error 193] %1 ist keine zul�ssige Win32-Anwendung
-->End of Python script error report<-
Mein Script, welches bei einem einfachen Doppelklick ohne Probleme funktioniert:
#!c:/Python27/python.exe
import os
import sys
import telnetlib
import warnings
host = "192.168.0.110"
Port = "7072"
def setStatus():
tn = telnetlib.Telnet(host, 7072, 5)
tn.write("set XBMC on\n")
tn.write("quit\n")
setStatus()
Alles anzeigen
EDIT: Ich habe mir jetzt mal eine exe aus dem Script mit py2exe gebaut. Wenn ich die Exe über den Explorer starte, dann funktioniert das Script. Wenn ich es jetzt wieder in callback einbaue, dann sehe ich kurz ein Konsolenfenster ohne Fehlermeldung, aber es passiert nix.
Mache ich da irgendwas falsch?