> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Issues.issue client

## SceneCoordinateIssue Objects

```python theme={"dark"}
class SceneCoordinateIssue(_BaseIssue)
```

Issue anchored to a 3D coordinate within a scene on a specific frame.

## IssueFrameRange Objects

```python theme={"dark"}
class IssueFrameRange(BaseDTO)
```

Represents a range of frames \[start, end] inclusive

## FrameRangeIssue Objects

```python theme={"dark"}
class FrameRangeIssue(_BaseIssue)
```

Issue anchored to a range of frames

## AnnotationIssue Objects

```python theme={"dark"}
class AnnotationIssue(_BaseIssue)
```

Issue anchored to a specific annotation (label rejection or annotation feedback)

## TaskIssues Objects

```python theme={"dark"}
class TaskIssues()
```

#### list

```python theme={"dark"}
def list() -> Iterable[Issue]
```

Lists all issues (comment threads) for this task.

Returns an iterator of issues anchored to different parts of the data unit:

* FileIssue: Issues anchored to the entire data unit
* FrameIssue: Issues anchored to a specific frame
* CoordinateIssue: Issues anchored to specific 2D coordinates on a frame
* SceneCoordinateIssue: Issues anchored to 3D scene coordinates on a frame
* FrameRangeIssue: Issues anchored to a range of frames
* AnnotationIssue: Issues anchored to a specific annotation

Each issue includes comments, tags, and resolution history.

**Returns**:

* `Iterable[Issue]` - An iterator of Issue objects (discriminated union of all issue types).

**Example**:

```python theme={"dark"}
for issue in task.issues.list():
    if isinstance(issue, FileIssue):
        print(f"File issue: {issue.comments[0].content}")
    elif isinstance(issue, FrameIssue):
        print(f"Frame {issue.frame_index}: {issue.comments[0].content}")
```

#### add\_file\_issue

```python theme={"dark"}
def add_file_issue(comment: str,
                   issue_tags: List[str],
                   space_id: Optional[str] = None) -> None
```

Adds a file issue.

**Arguments**:

* `comment` *str* - The comment for the issue.
* `issue_tags` *List\[str]* - The issue tags for the issue.
* `space_id` *Optional\[str]* - For Data Groups, identifies which child of the data group
  the issue is attached to. Leave as `None` for non-Data Group data units.

#### add\_frame\_issue

```python theme={"dark"}
def add_frame_issue(frame_index: int,
                    comment: str,
                    issue_tags: List[str],
                    space_id: Optional[str] = None) -> None
```

Adds a frame issue.

**Arguments**:

* `frame_index` *int* - The index of the frame to add the issue to.
* `comment` *str* - The comment for the issue.
* `issue_tags` *List\[str]* - The issue tags for the issue.
* `space_id` *Optional\[str]* - For Data Groups, identifies which child of the data group
  the issue is attached to. Leave as `None` for non-Data Group data units.

#### add\_coordinate\_issue

```python theme={"dark"}
def add_coordinate_issue(frame_index: int,
                         x: float,
                         y: float,
                         comment: str,
                         issue_tags: List[str],
                         space_id: Optional[str] = None) -> None
```

Adds a issue pinned to a coordinate.

**Arguments**:

* `frame_index` *int* - The index of the frame to add the issue to.
* `x` *float* - The x coordinate of the issue.
* `y` *float* - The y coordinate of the issue.
* `comment` *str* - The comment for the issue.
* `issue_tags` *List\[str]* - The issue tags for the issue.
* `space_id` *Optional\[str]* - For Data Groups, identifies which child of the data group
  the issue is attached to. Leave as `None` for non-Data Group data units.

#### add\_scene\_coordinate\_issue

```python theme={"dark"}
def add_scene_coordinate_issue(frame_index: int, x: float, y: float, z: float,
                               comment: str, issue_tags: List[str]) -> None
```

Adds an issue pinned to a 3D coordinate in a scene on a specific frame.

**Arguments**:

* `frame_index` *int* - The index of the frame to add the issue to.
* `x` *float* - The x coordinate (in scene space).
* `y` *float* - The y coordinate (in scene space).
* `z` *float* - The z coordinate (in scene space).
* `comment` *str* - The comment for the issue.
* `issue_tags` *List\[str]* - The issue tags for the issue.

#### delete

```python theme={"dark"}
def delete(issues: List[Union[Issue, UUID]]) -> None
```

Deletes one or more issues from this task in a single request.

Accepts either `Issue` objects (as returned by `list()`) or raw UUIDs,
mixed freely. Empty input is a no-op.

Permissions: project admins can delete any issue. Issue authors can
delete their own general issues, but annotation issues (label
rejections) can only be deleted by project admins.

The back-end validates the entire batch before deleting anything: if
any issue cannot be deleted (because the caller is not the author and
not a project admin, or the issue doesn't belong to this task's
project), the request raises and NO issues in the batch are deleted.

**Arguments**:

* `issues` - A list of `Issue` objects or `UUID`s to delete.

**Example**:

```python theme={"dark"}
# Delete a single issue:
task.issues.delete([issue])

# Or delete several at once:
obsolete = [i for i in task.issues.list() if i.comments[0].content.startswith("[obsolete]")]
task.issues.delete(obsolete)
```
