-
Notifications
You must be signed in to change notification settings - Fork 59
requests.SetRecordDirectory takes 1 positional argument but 2 were given #88
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
Comments
Same here! SetFilenameFormatting gets me a "takes 1 positional argument but 2 were given" and GetFilenameFormatting gets me a "request call failed" Here is my code:
Edit: Looking at the Requests Protocol sheet I managed to find the new way (v5) of formatting the request for the recording part (StartRecording -> StartRecord). Unfortunately I did not find the new way of manipulating the filename formatting. I will continue to search. |
Also getting similar when using SetSceneItemRender (in legacy v4 mode)... |
With the new version of obs-websocket-py you need to explicitly name parameters, e.g.: requests.SetFilenameFormatting(**{'filename-formatting': 'TESTNAME'}) (yes, you need to use dictionary unpacking, since the key contains |
See keywords here: https://github.com/obsproject/obs-websocket/blob/4.x-compat/docs/generated/protocol.md#setsceneitemrender, and use the same dictionary unpacking trick. |
Ah, thanks. I did think a bit after commenting and some reading that it might be the parameter names... but didn't know about dictionary unpacking, so thanks for that :) |
@Elektordi would it be possible to restore the old behavior, when kwargs with |
Executing
requests.SetRecordDirectory('C:/Users/REDS1736/Desktop')
results in the following error:I already tried giving the desired path as a keyword (
requests.SetRecordDirectory(recordDirectory='C:/Users/REDS1736/Desktop')
; i guessed the name of the keyword using this official piece of OBS docs: https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#setrecorddirectory), but that just gives me a new error:I suppose, the keyword i use is wrong but i can't find the right one.
The text was updated successfully, but these errors were encountered: