# API Reference v10.3.1 (Python)

## Warnings (class)

Module: zaber_motion.ascii

Class used to check and reset warnings and faults on device or axis.

The following examples illustrate how you can obtain an instance of this type:

```py
from zaber_motion.ascii import Connection

connection = Connection.open_serial_port("COM3")
device = connection.get_device(1)
warnings = device.warnings
```

```py
from zaber_motion.ascii import Connection

connection = Connection.open_serial_port("COM3")
device = connection.get_device(1)
axis = device.get_axis(1)
warnings = axis.warnings
```

Related Guides:

- [Warning flags](https://software.zaber.com/motion-library/docs/guides/device_features/warnings.md)

### Methods

#### `clear_flags()` (async available)

`warnings.clear_flags()`

Clears (acknowledges) current warnings and faults on axis or device and returns them.

##### Return Value

Type: `Set[str]`

Warnings and faults before clearing. Refer to WarningFlags to check a particular flag.

#### `get_flags()` (async available)

`warnings.get_flags()`

Returns current warnings and faults on axis or device.

##### Return Value

Type: `Set[str]`

Retrieved warnings and faults. Refer to WarningFlags to check a particular flag.
