Errors section in readme updated

This commit is contained in:
onyx-and-iris 2023-08-11 22:35:25 +01:00
parent 6fa24fe609
commit f88e8ee3a6

View File

@ -9,10 +9,10 @@ Not all endpoints in the official documentation are implemented.
## Requirements ## Requirements
- [OBS Studio](https://obsproject.com/) - [OBS Studio](https://obsproject.com/)
- [OBS Websocket v5 Plugin](https://github.com/obsproject/obs-websocket/releases/tag/5.0.0) - [OBS Websocket v5 Plugin](https://github.com/obsproject/obs-websocket/releases/tag/5.0.0)
- With the release of OBS Studio version 28, Websocket plugin is included by default. But it should be manually installed for earlier versions of OBS. - With the release of OBS Studio version 28, Websocket plugin is included by default. But it should be manually installed for earlier versions of OBS.
- Python 3.9 or greater - Python 3.9 or greater
### How to install using pip ### How to install using pip
@ -24,10 +24,10 @@ pip install obsws-python
By default the clients connect with parameters: By default the clients connect with parameters:
- `host`: "localhost" - `host`: "localhost"
- `port`: 4455 - `port`: 4455
- `password`: "" - `password`: ""
- `timeout`: None - `timeout`: None
You may override these parameters by storing them in a toml config file or passing them as keyword arguments. You may override these parameters by storing them in a toml config file or passing them as keyword arguments.
@ -128,7 +128,9 @@ def on_scene_created(data):
### Errors ### Errors
If a request fails an `OBSSDKError` will be raised with a status code. A base error class `OBSSDKError` may be used to catch OBSSDK error types.
If a request returns an error code an `OBSSDKRequestError` will be raised.
For a full list of status codes refer to [Codes](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#requeststatus) For a full list of status codes refer to [Codes](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#requeststatus)
@ -165,4 +167,4 @@ pytest -v
For the full documentation: For the full documentation:
- [OBS Websocket SDK](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#obs-websocket-501-protocol) - [OBS Websocket SDK](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#obs-websocket-501-protocol)