Jump to content


Photo

VU+ Duo] Error append +11 Option Python Plugin

?

  • Please log in to reply
5 replies to this topic

#1 terrorman

  • Member
  • 23 posts

0
Neutral

Posted 14 September 2010 - 01:41

I have a problem with this function, I can only have 10 choices?


when I add I have an error 11


option = array 0,1,2,3,4,5,6,7,8,9,10 ok

option = array 0,1,2,3,4,5,6,7,8,9,10,11 ko


I'm learning and I need a lot of information, can help me understand this error


thanks




def __init__(self, session, args = 0):
	   self.session = session

	   list = []
	   list.append((_("Camd3"), "Func_Init_Cam_Camd3"))
	   list.append((_("CCcam"), "Func_Init_Cam_CCcam"))
	   list.append((_("CCcam + SBox + MBox + BorraOff [EMU CCcam]"), "Func_Init_Cam_CCcam_SBox_SBox"))
	   list.append((_("GBox"), "Func_Init_Cam_GBox"))
		 list.append((_("HyperCam"), "Func_Init_Cam_HyperCam"))
	   list.append((_("MBox"), "Func_Init_Cam_MBox"))
		 list.append((_("MBox + SBox + CCcam + BorraOff [EMU MBox]"), "Func_Init_Cam_MBox_SBox_CCcam"))
	   list.append((_("MGCamd"), "Func_Init_Cam_MGCamd"))
		 list.append((_("NewCS"), "Func_Init_Cam_NewCS"))
		 list.append((_("NewCS + CCcam"), "Func_Init_Cam_NewCS_CCcam"))
	   list.append((_("NewCS + MBox"), "Func_Init_Cam_NewCS_MBox"))
	   list.append((_("Salir"), "Func_Exit"))


ERROR

Traceback (most recent call last):
File "/usr/lib/enigma2/python/mytest.py", line 189, in processDelay
callback(*retval)
File "/dreambox/oe.openpli/build-vuduo/tmp/work/enigma2-openpli+git7418+1888d04899a32534194a0ff617a784a1cd35e795-r21/image/usr/lib/enigma2/python/Screens/InfoBarGenerics.py", line 1354, in extensionCallback
File "/dreambox/oe.openpli/build-vuduo/tmp/work/enigma2-openpli+git7418+1888d04899a32534194a0ff617a784a1cd35e795-r21/image/usr/lib/enigma2/python/Tools/BoundFunction.py", line 9, in __call__
File "/dreambox/oe.openpli/build-vuduo/tmp/work/enigma2-openpli+git7418+1888d04899a32534194a0ff617a784a1cd35e795-r21/image/usr/lib/enigma2/python/Screens/InfoBarGenerics.py", line 606, in runPlugin
File "/usr/lib/enigma2/python/Plugins/Extensions/TRRPanel/plugin.py", line 4, in main
from TRRPanel import CLASS_Menu_TRRPanel
File "/usr/lib/enigma2/python/Plugins/Extensions/TRRPanel/TRRPanel.py", line 160
list.append((_("Salir"), "Func_Exit"))
^
IndentationError: unexpected indent
(PyObject_CallObject(<bound method Session.processDelay of <__main__.Session instance at 0x2f71d4e0>>,()) failed)



Re: VU+ Duo] Error append +11 Option Python Plugin #2 littlesat

  • PLi® Core member
  • 56,378 posts

+692
Excellent

Posted 14 September 2010 - 06:01

I think you are using mixed spaces and tabs, you should use tabs only in phyton -or- you used two tabs at some list.appends (line 9,11,14,14) which is one too mucht. This is suggested by the unexpected indent error and the incorrect "jumping" code.

Please not that in phyton tabs can be compared with brackets {} in C++

Re: VU+ Duo] Error append +11 Option Python Plugin #3 terrorman

  • Member
  • 23 posts

0
Neutral

Posted 15 September 2010 - 02:20

do not quite understand what you mean, sorry.


the error does not appear to be of expression, with 11 options in the menu works well, with 12 or more options this error occurs.


thanks for the help

Re: VU+ Duo] Error append +11 Option Python Plugin #4 terrorman

  • Member
  • 23 posts

0
Neutral

Posted 15 September 2010 - 02:26

I have to clean the variable?

Re: VU+ Duo] Error append +11 Option Python Plugin #5 MiLo

  • PLi® Core member
  • 14,049 posts

+298
Excellent

Posted 15 September 2010 - 06:50

No you have to use a better editor. Python is complaining about your indentation, you're probably mixing spaces and tabs. If the original code uses tabs, you must do so as well when adding an item.

Or just google "IndentationError" and you'll find thousands of links.
Real musicians never die - they just decompose

Re: VU+ Duo] Error append +11 Option Python Plugin #6 terrorman

  • Member
  • 23 posts

0
Neutral

Posted 15 September 2010 - 22:23

ups, thank you very much friends, sorry to be so clumsy with the English, now I understand what I mean.


thank you very much.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users