Page 1 of 1

PlexEvents

Posted: Mon Feb 23, 2015 10:22 pm
by anderscode
Hi

I just started with python(as in lets look at examples and try something) because i needed a Plex media server event forwarder for eventghost, the code for fetching the data from the server works in normal python 2.7 but trying to run the full thing as a plugin does not. Its not at all unlikely i have missed something simple so any help is appreciate

I get the error "No handlers could be found for logger "root" in Eventghost

:edit:
First as far as i know working version :) STOPP events are not 100% as i found no reliable way for it.
https://github.com/anderscode/PlexEvents


Regards
Anders

Re: PlexEvents

Posted: Tue Feb 24, 2015 5:31 am
by Pako
Here you will find a solution to your problem.
Only then you will get the real cause:

Code: Select all

ERROR:root:On_WS_Error() takes exactly 2 arguments (3 given)
ERROR:root:On_WS_Close() takes exactly 1 argument (2 given)
Pako

Re: PlexEvents

Posted: Tue Feb 24, 2015 8:47 am
by krambriw
Yes, as Pako indicated,

You have to declare your functions like this, then I think it will work

Code: Select all

    def On_WS_Message(self, ws, message):
(Add the keyword 'self')

Re: PlexEvents

Posted: Tue Feb 24, 2015 9:36 am
by Pako
Dear Walter,
krambriw wrote:You have to declare your functions like this, then I think it will work ...
I just did not want to give away the whole point ... :D

Best regards,
LuboŇ°

Re: PlexEvents

Posted: Tue Feb 24, 2015 9:50 am
by anderscode
Thank you both for the help now it works. Now to coax a stop message out of it add some error handling/config and its usable. Il post the final code when done incase somwone else wants it.


// Anders

Re: PlexEvents

Posted: Tue Feb 24, 2015 10:02 am
by krambriw
I just did not want to give away the whole point ... :D
Oooops :oops: