{"record":{"id":"5a7f8f493d3c54e6","repo":"affaan-m/ECC","slug":"placement-event-id-missing-from-requested-track","errorCode":null,"errorMessage":"placement {event['id']} missing from requested track","messagePattern":"placement (.+?) missing from requested track","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"skills/taste-application/scripts/tasteforge/resolve.py","lineNumber":205,"sourceCode":"    return snapshot\n\n\ndef _readback(timeline, item, event):\n    track = event[\"track\"]\n    members = _items(timeline, \"video\", track)\n\n    # API wrappers can be recreated on each call, so verify track membership by\n    # stable unique id when available; test doubles may use object identity.\n    def identity(candidate):\n        method = getattr(candidate, \"GetUniqueId\", None)\n        return method() if callable(method) else id(candidate)\n\n    item_id = identity(item)\n    if item_id is None:\n        raise RuntimeError(\"Resolve returned an item without an identity\")\n    matches = [member for member in members if identity(member) == item_id]\n    if len(matches) != 1:\n        raise RuntimeError(f\"placement {event['id']} missing from requested track\")\n    item = matches[0]\n    actual = {\n        \"start\": item.GetStart(),\n        \"end\": item.GetEnd(),\n        \"duration\": item.GetDuration(),\n        \"enabled\": item.GetClipEnabled(),\n        \"track\": track,\n        \"opacity\": item.GetProperty(\"Opacity\"),\n        \"composite\": item.GetProperty(\"CompositeMode\"),\n        \"path\": _path(item),\n    }\n    expected = {\n        \"start\": event[\"record_frame\"],\n        \"end\": event[\"record_frame\"] + event[\"frames\"],\n        \"duration\": event[\"frames\"],\n        \"enabled\": True,\n        \"track\": track,\n        \"opacity\": event[\"opacity\"],","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/taste-application/scripts/tasteforge/resolve.py#L187-L223","documentation":"After appending placements, _readback looks up each placed item among the track's members by unique identity and requires exactly one match. Zero or multiple matches means the clip did not land on the requested track (or duplicates were created), so the operation fails loudly rather than continuing with a wrong edit.","triggerScenarios":"AppendToTrack silently dropped the clip; the clip landed on a different track than requested; duplicate items share an identity; the track list was read from the wrong track index.","commonSituations":"Target track locked or auto-disabled in Resolve; media pool item failed to import so append no-ops; Resolve redirecting inserts to the first available track; concurrent edits to the timeline during apply.","solutions":["Check the target video track is not locked/hidden and exists in Resolve","Inspect the timeline after failure to find where the clip actually landed","Re-run apply on a fresh versioned timeline; avoid concurrent edits during apply","Verify media pool items imported successfully before append","Confirm the track index used for readback matches the one used for append"],"exampleFix":"// before\n# appended to track 2 but track was locked; readback searches track 2 and finds nothing\n// after\ntrack_item = timeline.GetTrackName(\"video\", track)\nassert not timeline.GetIsTrackLocked(\"video\", track)  # or unlock before apply\napply_placements(...)","handlingStrategy":"validation","validationCode":"if timeline.GetIsTrackLocked(\"video\", track):\n    raise ValueError(f\"video track {track} is locked; unlock before applying placements\")","typeGuard":"def track_is_appendable(timeline, kind: str, track: int) -> bool:\n    return (not timeline.GetIsTrackLocked(kind, track)) and track < timeline.GetTrackCount(kind)","tryCatchPattern":"try:\n    apply_placements(...)\nexcept RuntimeError as exc:\n    if \"missing from requested track\" in str(exc):\n        print(f\"Check track locks and where the clip landed: {exc}\")\n    raise","preventionTips":["Unlock/enable target video tracks before applying","Verify media pool imports succeeded before AppendToTrack","Run applies against a fresh duplicated timeline, never interactively edited ones","Avoid concurrent edits/scripts on the timeline during apply"],"tags":["resolve-api","readback","track"],"backgroundTag":"record-not-found","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}