Instantiate Event Listener

Hey,

I’m trying to instantiate an event listener I’ve made, and calling a method on it but I keep on getting this error when calling the method;

NullReferenceException : Object reference not set to an instance of an object.

Is something special happening behind the scenes when Deadline runs the event listeners?

Hmm…can we see your code? Does it look like this?
docs.thinkboxsoftware.com/produc … ml#py-file

Are you instantiating within an Event plugin’s environment?

Latest version of Deadline? (There has been some small fixes to Event Plugins in 8.0.1.0 and 8.0.6.5):
docs.thinkboxsoftware.com/produc … notes.html

No, I’m trying to instantiate the event plugin in a post task script.

I’m running 7.1.2.1

Ah, right. This is not possible. Sounds like you need task based event plugins. :wink:

For the time being, what is it in the event plugin you need from within a post task script? For example, event plugin config could be pulled via:

RepositoryUtils.GetEventPluginConfig()

docs.thinkboxsoftware.com/produc … 29d6698aa1

That’s right. I’m hacking my way to it :slight_smile:

I’ve worked around it for now, by adding the pre and post task scripts with an event “OnJobSubmitted”, then I’ve just duplicated the code from the event plugin. But would have been nice, not to have duplicated code :wink:

Here is the final event plugin; github.com/tokejepsen/pyblish-d … in/Pyblish