Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

Error when trying to set up a new command #48

Closed
thomashercouet opened this issue Mar 8, 2021 · 7 comments
Closed

Error when trying to set up a new command #48

thomashercouet opened this issue Mar 8, 2021 · 7 comments

Comments

@thomashercouet
Copy link

thomashercouet commented Mar 8, 2021

I'm trying to assign new buttons and the Run Setup interrupts when I choose the function I want the fader to call :

Updating scene list, plase wait
Traceback (most recent call last):
File "setup.py", line 1755, in
mainLoop()
File "setup.py", line 1707, in mainLoop
midicallback(msg, device["id"], device["devicename"])
File "setup.py", line 204, in midicallback
setupFaderEvents(action, message.channel, message.control, message.value, message.type, deviceID)
File "setup.py", line 213, in setupFaderEvents
updateSceneList()
File "setup.py", line 1454, in updateSceneList
if jsn["message-id"] == "9999999":
KeyError: 'message-id'

Do you have any idea where it comes from?

@lebaston100
Copy link
Owner

What's your obs and obs-websocket versions?
And do you have the password enabled in the obs-websocket settings?

@thomashercouet
Copy link
Author

I am currently under OBS 26.1.1 and Websocket 4.9.0. The password isn't enabled.
(sorry for the long delay, I didn't get notify you answered!)

@lebaston100
Copy link
Owner

Thanks. That should be fine, i can't replicate the issue on my end.
How familiar are you with python? Could you add a "print(jsn)" after line 1451 which would show the message that comes from obs which causes the error.

@thomashercouet
Copy link
Author

Right, I think I'm onto somthing. This is what shows :

{'item-id': 4, 'item-name': 'Tchou', 'scene-name': '+ TRAIN', 'transform': {'bounds': {'alignment': 0, 'type': 'OBS_BOUNDS_NONE', 'x': 0.0, 'y': 0.0}, 'crop': {'bottom': 0, 'left': 0, 'right': 0, 'top': 0}, 'groupChildren': [{'bounds': {'alignment': 0, 'type': 'OBS_BOUNDS_NONE', 'x': 1.0, 'y': 1.0}, 'crop': {'bottom': 0, 'left': 0, 'right': 0, 'top': 0}, 'height': 202.0, 'locked': False, 'parentGroupName': 'Tchou', 'position': {'alignment': 5, 'x': 1610.0, 'y': 304.0}, 'rotation': 4.699999809265137, 'scale': {'x': 0.18697915971279144, 'y': 0.18703703582286835}, 'sourceHeight': 1080, 'sourceWidth': 1920, 'visible': True, 'width': 359.0}, {'bounds': {'alignment': 0, 'type': 'OBS_BOUNDS_NONE', 'x': 1.0, 'y': 1.0}, 'crop': {'bottom': 0, 'left': 0, 'right': 0, 'top': 0}, 'height': 181.0, 'locked': False, 'parentGroupName': 'Tchou', 'position': {'alignment': 5, 'x': 1617.0, 'y': 314.0}, 'rotation': 3.799999952316284, 'scale': {'x': 0.903333306312561, 'y': 0.9049999713897705}, 'sourceHeight': 200, 'sourceWidth': 300, 'visible': True, 'width': 271.0}, {'bounds': {'alignment': 0, 'type': 'OBS_BOUNDS_NONE', 'x': 0.0, 'y': 0.0}, 'crop': {'bottom': 0, 'left': 0, 'right': 0, 'top': 0}, 'height': 1135.001220703125, 'locked': False, 'parentGroupName': 'Tchou', 'position': {'alignment': 5, 'x': 0.0, 'y': 0.0}, 'rotation': 0.0, 'scale': {'x': 1.0510417222976685, 'y': 1.0509270429611206}, 'sourceHeight': 1080, 'sourceWidth': 1920, 'visible': True, 'width': 2018.0001220703125}, {'bounds': {'alignment': 0, 'type': 'OBS_BOUNDS_NONE', 'x': 0.0, 'y': 0.0}, 'crop': {'bottom': 0, 'left': 0, 'right': 0, 'top': 0}, 'height': 1080.0, 'locked': False, 'parentGroupName': 'Tchou', 'position': {'alignment': 5, 'x': 64.00000762939453, 'y': 0.0}, 'rotation': 0.0, 'scale': {'x': 1.0, 'y': 1.0}, 'sourceHeight': 1080, 'sourceWidth': 1920, 'visible': True, 'width': 1920.0}], 'height': 1179.16796875, 'locked': False, 'position': {'alignment': 5, 'x': -140.4666748046875, 'y': -38.20000076293945}, 'rotation': 0.0, 'scale': {'x': 1.0379999876022339, 'y': 1.0379999876022339}, 'sourceHeight': 1136, 'sourceWidth': 2019, 'visible': True, 'width': 2095.721923828125}, 'update-type': 'SceneItemTransformChanged'}

I have a couple of move filters that keep being perpetually active in order to create animated backgrounds. They seem to override the data reception so I'll put them all on hold while their respective scenes are inactives and see if it comes from there. Feel free to let me know if you think it may be something else!

@thomashercouet
Copy link
Author

Did a couple of tests and yep, it was 100% this. Didn't see it coming! I'll let you know if the trouble shows up again! Thanks again for your amazing soft!

@lebaston100
Copy link
Owner

lebaston100 commented Mar 27, 2021

Nice, i was expecting something in that direction. The logic that get's the data is not "smart" enough to ignore these kinds of messages. It basically establishes a connection, sends the data request and takes the first message that comes back. While this all happens in just a few ms, with animation stuff like that that "spam" broadcast events, chances that it receives another message are pretty high.

@lebaston100
Copy link
Owner

Closing this for now as there currently isn't anything panned to improve this part of the logic.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants