Jump to content


Photo

GrapMultiEpg


  • Please log in to reply
7 replies to this topic

#1 extreme71

  • Member
  • 41 posts

0
Neutral

Posted 5 March 2014 - 15:25

I'm trying to invoke the plugin MultiEPG via button from a panel that I have done,I put this code in the s panel
 


 

def Epg(self):
        from Plugins.Extensions.GraphMultiEPG.GraphMultiEpg import GraphMultiEPG
        from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN
        self.session.open(GraphMultiEPG)

but I get this error:



 

Screen <class 'Plugins.Extensions.GraphMultiEPG.GraphMultiEpg.GraphMultiEPG'>((), {}): <type 'exceptions.TypeError'>
Traceback (most recent call last):
  File "/usr/lib/enigma2/python/mytest.py", line 239, in create
    return screen(self, *arguments, **kwargs)
TypeError: __init__() takes at least 3 arguments (2 given)
Traceback (most recent call last):
  File "/usr/lib/enigma2/python/Components/ActionMap.py", line 46, in action
    res = self.actions[action]()
  File "/usr/lib/enigma2/python/Screens/Mypanel.py", line 185, in Epg
    self.session.open(GraphMultiEPG)

how to solve it?


Edited by extreme71, 5 March 2014 - 15:25.


Re: GrapMultiEpg #2 ims

  • PLi® Core member
  • 13,780 posts

+214
Excellent

Posted 5 March 2014 - 16:01

TypeError: __init__() takes at least 3 arguments (2 given)

must call it with services   ...  self.session.open(GraphMultiEPG, services)

 

See into its plugin.py, how it is called.


Edited by ims, 5 March 2014 - 16:25.

Kdo nic nedělá, nic nezkazí!

Re: GrapMultiEpg #3 extreme71

  • Member
  • 41 posts

0
Neutral

Posted 5 March 2014 - 17:11

class GraphMultiEPG(Screen, HelpableScreen):
        EMPTY = 0
        ADD_TIMER = 1
        REMOVE_TIMER = 2
       
        ZAP = 1

the Plugin is GraphMultiEpg.py......



Re: GrapMultiEpg #4 ims

  • PLi® Core member
  • 13,780 posts

+214
Excellent

Posted 5 March 2014 - 17:41

once again - see plugin.py in GraphMultiEPG.

In class GraphMultiEPG you must see parameters in it's  __init__


Edited by ims, 5 March 2014 - 17:43.

Kdo nic nedělá, nic nezkazí!

Re: GrapMultiEpg #5 extreme71

  • Member
  • 41 posts

0
Neutral

Posted 5 March 2014 - 18:01

this is the class in the file plugin.py

 

class SelectBouquet(Screen):
        skin = """<screen name="SelectBouquet" position="center,center" size="300,240" title="Select a bouquet">
                <widget name="menu" position="10,10" size="290,225" scrollbarMode="showOnDemand" />
        </screen>"""

        def __init__(self, session, bouquets, curbouquet, direction, enableWrapAround=True):
                Screen.__init__(self, session)

here is the file plugin.py

 

here is the file GraphMultiEPG

I'm sorry for my english



Re: GrapMultiEpg #6 ims

  • PLi® Core member
  • 13,780 posts

+214
Excellent

Posted 5 March 2014 - 18:05

you must call it as:  self.session.open(GraphMultiEPG, services)


Kdo nic nedělá, nic nezkazí!

Re: GrapMultiEpg #7 extreme71

  • Member
  • 41 posts

0
Neutral

Posted 5 March 2014 - 21:48

I correct the original files as a class have

 

the file I posted previously, should be the openpli

the file plugin.py does not contain class

class GraphMultiEPG(Screen):
    EMPTY = 0
    ADD_TIMER = 1
    REMOVE_TIMER = 2
    
    ZAP = 1

    def __init__(self, session, services, zapFunc=None, bouquetChangeCB=None):
        Screen.__init__(self, session)



Re: GrapMultiEpg #8 ims

  • PLi® Core member
  • 13,780 posts

+214
Excellent

Posted 5 March 2014 - 22:16

I wrote, that you can see into plugin.py, how there is called GraphMultiEPG. There you will see, what is needed.


Kdo nic nedělá, nic nezkazí!


2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users