Menu

#10 Not a valid plugin error

v1.x
pending
nobody
None
1
2017-01-29
2016-01-09
Anonymous
No

I'm encountering a problem that I do not understand. I'm a newbie, and so I'm probably just doing something silly and could use a little advice. I have a plug called "Foo" and an info file describing it called "Foo.yapsy-plugin". Yet when I turn on "debug", I see that the PluginManager outputs an error stating that:

DEBUG:yapsy:Foo.py is not a valid plugin for strategy info_ext

Can you give me any advice on how to resolve this? The contents of the Foo.yapsy-plugin file:

[Core]
Name = Foo Plugin
Module = Foo

[Documentation]
Author = me
Version = 0.1
Website = N/A
Description = Placeholder

and Foo.py:

from yapsy.IPlugin import IPlugin

class Foo(IPlugin):
    def __init__(self):
        # initialise parent class
        IPlugin.__init__(self)

    def print_name(self):
        print "Foo"

    def ordering(self):
        return 100

Your help is much appreciated!
Ralph

Discussion

  • Anonymous

    Anonymous - 2016-03-03

    You shouldn't have to worry about using the init function in a plugin. You should override activate if there is any code to run when your plugin is loaded.

     
  • Thibauld Nion

    Thibauld Nion - 2017-01-29
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -16,6 +16,7 @@
    
     and Foo.py:
    
    +~~~
     from yapsy.IPlugin import IPlugin
    
     class Foo(IPlugin):
    @@ -28,6 +29,7 @@
    
         def ordering(self):
             return 100
    +~~~
    
     Your help is much appreciated!
     Ralph
    
     
  • Thibauld Nion

    Thibauld Nion - 2017-01-29

    Sorry for the very late answer, but I guess you found the solution already: the debug log you see is 100% normal as yapsy is (probably in your case, it depends on the setup) looking for files ending by ".yapsy-plugin".

    But the look-up scans all the files including of course Foo.py which is not a valid plugin description file.

    Did something more occured that let you think there was a big problem ?

     
  • Thibauld Nion

    Thibauld Nion - 2017-01-29
    • status: open --> pending
     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.