My fault
The Enigma2 is continually restarting
02:48:00.4139 { } Plugins/Extensions/AutoTimer/AutoPoller.py:19 __init__ [AutoTimer] Auto Poll Enabled 02:48:00.4175 { } mytest.py:865 <module> EXCEPTION IN PYTHON STARTUP CODE: 02:48:00.4178 { } mytest.py:866 <module> ------------------------------------------------------------ 02:48:00.4180 { D } Traceback (most recent call last): 02:48:00.4183 { D } File "/usr/lib/enigma2/python/mytest.py", line 859, in <module> 02:48:00.4201 { D } runScreenTest() 02:48:00.4204 { D } File "/usr/lib/enigma2/python/mytest.py", line 537, in runScreenTest 02:48:00.4206 { D } plugins.readPluginList(resolveFilename(SCOPE_PLUGINS)) 02:48:00.4208 { D } File "/usr/lib/enigma2/python/Components/PluginComponent.py", line 104, in readPluginList 02:48:00.4217 { D } File "/usr/lib/enigma2/python/Components/PluginComponent.py", line 30, in addPlugin 02:48:00.4223 { D } TypeError: autostartProc() takes exactly 1 argument (0 given) 02:48:00.4226 { } mytest.py:868 <module> [mytest.py] quitMainloop #4 02:48:00.4230 { } mytest.py:870 <module> ------------------------------------------------------------ 02:48:00.4260 [ ] enigma.cpp:388 main [MAIN] (exit code 5)
Please... where exactly is now the problem in my code ?
Thanks.
########################################################################### # Enigma2 plugin ########################################################################### ########################################################################### from Screens.Screen import Screen from Components.MenuList import MenuList from Components.ActionMap import ActionMap from Screens.MessageBox import MessageBox from Plugins.Plugin import PluginDescriptor ########################################################################### from Components.Sources.CurrentService import CurrentService import NavigationInstance from time import sleep ########################################################################### from Components.Label import Label from Components.Pixmap import Pixmap from Components.AVSwitch import AVSwitch from enigma import ePicLoad ########################################################################### from enigma import eTimer ########################################################################### class MyTest(Screen): skin = '\n <screen position="0,0" size="1280,720" >\n <widget name="pic" position="0,0" size="1280,720" alphatest="on" /> </screen>' def __init__(self, session, args = 0): self.session = session Screen.__init__(self, session) self["pic"] = Pixmap() self.picload = ePicLoad() self.picload.PictureData.get().append(self.showPic) self.picload.getThumbnail('/usr/share/enigma2/skin_default/testscreen.png', 1280, 720) self.hideShowTimer = eTimer() self.hideShowTimer.callback.append(self.showHide) self.visible = False def showPic(self, picInfo=""): ptr = self.picload.getData() if ptr is not None: self["pic"].instance.setPixmap(ptr.__deref__()) self["pic"].show() self.hideShowTimer.start(15000, False) # 15 000 milisec. waiting self.visible = True def showHide(self): if self.visible: self["pic"].hide() self.visible = False self.close(None) else: self["pic"].show() self.visible = True ########################################################################### def autostartProc(session, **kwargs): if "02:35" == datetime.datetime.now().strftime("%H:%M"): session.open(MyTest) self.cycleTimer = eTimer() self.cycleTimer.callback.append(self.autostartProc) self.cycleTimer.start(60000, False) # 60 000 milisec. waiting def myTest(session, **kwargs): session.open(MyTest) ########################################################################### def Plugins(**kwargs): return [ PluginDescriptor( where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostartProc), PluginDescriptor( name = "TesT plugin name", description = "TesT plugin descriptions", where = PluginDescriptor.WHERE_PLUGINMENU, icon = "plugin.png", fnc = myTest) ]