Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin set result giving errors #14

Open
yogeshVU opened this issue Sep 7, 2020 · 0 comments
Open

plugin set result giving errors #14

yogeshVU opened this issue Sep 7, 2020 · 0 comments

Comments

@yogeshVU
Copy link
Contributor

yogeshVU commented Sep 7, 2020

Following two functions give errors when invoked during the debug mode using run_debug.py.

          self.result_set_success(False)

          self.result_set_error('This should fail')

Error is:

error: 2020-09-07T13:11:23.165Z - error: [gme:bin:coremq_server:CoreZMQ] res { err: { message: 'Cannot read property \'setSuccess\' of undefined', type: 'TypeError', stack: 'TypeError: Cannot read property \'setSuccess\' of undefined\n req: { name: 'resultSetSuccess', args: [Array], type: 'plugin' } }, res: null }

Steps to recreate:
Create a new python plugin and add the following lines at the end:
eg:

class MyPythonPlugin(PluginBase):
    def main(self):
        core = self.core
        root_node = self.root_node
        active_node = self.active_node
        name = core.get_attribute(active_node, 'name')
        logger.info('ActiveNode at "{0}" has name {1}'.format(core.get_path(active_node), name))
        self.result_set_success(False)
        self.result_set_error('This should fail')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant