Exceptions

All dazpy exceptions inherit from DazError.

exception dazpy.exceptions.DazError[source]

Bases: Exception

Base class for all dazpy exceptions.

exception dazpy.exceptions.ConnectionError[source]

Bases: DazError

Raised when the SDK cannot reach the DAZ Studio Script Server.

exception dazpy.exceptions.AuthenticationError[source]

Bases: DazError

Raised on HTTP 401 or 403 (bad or missing API token, or IP blocked).

exception dazpy.exceptions.DazBusyError(message, reason='', retry_after=2.0)[source]

Bases: DazError

Base class for transient “DAZ Studio is busy, please retry” conditions.

reason

Human-readable explanation of why the server is busy.

retry_after

Server-suggested seconds to wait before retrying.

exception dazpy.exceptions.StudioBusyError(message, reason='', retry_after=2.0)[source]

Bases: DazBusyError

Raised on HTTP 503 STUDIO_BUSY: DAZ Studio’s main thread is occupied with a scene load, save, clear, or render and cannot service the request.

exception dazpy.exceptions.ConcurrencyLimitError(message, reason='', retry_after=2.0)[source]

Bases: DazBusyError

Raised on HTTP 429 CONCURRENT_LIMIT_EXCEEDED: too many requests are already in flight against the server.

exception dazpy.exceptions.ScriptError(message, script='', request_id='', output=None)[source]

Bases: DazError

Base class for errors that originate inside a DazScript execution.

script

The DazScript source that was submitted (may be empty for file-based executions).

request_id

The server-assigned request ID, useful for log correlation.

output

Lines written to the DAZ Studio message log before the error (e.g. via print()), useful for tracing state leading up to a failure.

property diagnostic: str

Return a formatted string with line-numbered source and error details.

exception dazpy.exceptions.ScriptSyntaxError(message, script='', request_id='', output=None)[source]

Bases: ScriptError

Raised when the DazScript engine reports a parse / syntax error.

exception dazpy.exceptions.ScriptRuntimeError(message, script='', request_id='', output=None)[source]

Bases: ScriptError

Raised when a DazScript execution fails at runtime (TypeError, ReferenceError, etc.).

exception dazpy.exceptions.TimeoutError[source]

Bases: DazError

Raised when an HTTP request or async poll exceeds its timeout.

exception dazpy.exceptions.NodeNotFoundError[source]

Bases: DazError

Raised when a requested scene node, bone, or skeleton cannot be found.

exception dazpy.exceptions.AsyncExecutionError(message, request_id='')[source]

Bases: DazError

Raised when an async request fails, is cancelled, or times out while polling.

request_id

The server-assigned request ID of the failed async job.

exception dazpy.exceptions.RenderError(message, request_id='')[source]

Bases: DazError

Raised when a render job fails on the DAZ Studio side.

request_id

The server-assigned render request ID.

exception dazpy.exceptions.BatchLimitExceededError[source]

Bases: DazError

Raised by execute() (or add_operation, for the operation-count limit) when a batch would exceed its configured operation-count or generated-script-length limit.

Raised client-side before any HTTP call, so an oversized batch never reaches Studio’s main thread.

exception dazpy.exceptions.MaterialError(message, request_id='')[source]

Bases: DazError

Raised when an Iray material/surface-property operation fails.

Covers a missing material, a channel label that doesn’t resolve to a property on the live material, or a failed setValue()/setMap().

request_id

The server-assigned render request ID.