Elektordi / obs-websocket-py

Python library to communicate with an obs-websocket server (for OBS Studio)
MIT License
223 stars 59 forks source link

TypeError when starting stream #64

Closed Column01 closed 3 years ago

Column01 commented 3 years ago

When sending the message to start the stream, it seems to have caused a TypeError on my StreamStatus event

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Users\Colin\AppData\Local\Programs\Python\Python38\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "C:\Users\Colin\Documents\_GithubRepos\PTZCamSync\PTZCamSync\lib\site-packages\obswebsocket\core.py", line 236, in run    
    self.core.eventmanager.trigger(obj)
  File "C:\Users\Colin\Documents\_GithubRepos\PTZCamSync\PTZCamSync\lib\site-packages\obswebsocket\core.py", line 280, in trigger
    if trigger is None or isinstance(data, trigger):
TypeError: isinstance() arg 2 must be a type or tuple of types
Column01 commented 3 years ago

Actually, this is my fault, I was using an instance of the event rather than the event class itself in the event register function.