OptrisOptrisDocumentation

Documentation/OTC SDK/optris_sdk — Python API referencev12.0

PathExistsError

class optris_sdk.errors.PathExistsError(InvalidArgumentError)

A file is already there, and the SDK will not destroy it.

Raised by optris_sdk.camera.Camera.start_recording when a regular file is already at the output path. Nothing is opened, nothing is truncated, and the file that is there is untouched; the message names the path.

A subclass of InvalidArgumentError, which is what this case used to be: the path the caller passed is what is wrong, and the caller is who can fix it. So except InvalidArgumentError keeps catching it, and code that wants to offer "that name is taken, choose another" catches this instead -- which it could not do before OPTRIS_SDK_ERROR_ALREADY_EXISTS existed, because the message was the only thing that distinguished it.

Not IoError: nothing failed to be read or written. The SDK deliberately did not try.