affaan-m/ECC · error · RuntimeError
could not set for
Error message
could not set {key} for {event['id']} What it means
After appending, apply_placements sets each item's Opacity and CompositeMode via item.SetProperty and raises this RuntimeError if SetProperty returns a falsy value (Resolve returns False when the property name or value is rejected). The message names the property key and event id. This ensures each overlay's compositing matches the plan before readback verification.
Solutions
- Ensure opacity is a number in 0-100 and composite is an integer in Resolve's accepted CompositeMode range.
- Test item.SetProperty('CompositeMode', v) manually in the Resolve console for your build to confirm supported values.
- Upgrade/downgrade or adjust the plan to composite modes supported by the running Resolve version.
Example fix
// before event["composite"] = "overlay" // after event["composite"] = 1 # Resolve CompositeMode integer
Defensive patterns
Strategy: type-guard
Validate before calling
for e in plan:
if not isinstance(e["opacity"], (int, float)) or not 0 <= e["opacity"] <= 100:
raise ValueError(f"bad opacity for {e['id']}")
if not isinstance(e["composite"], int) or not 0 <= e["composite"] <= 100:
raise ValueError(f"bad composite mode for {e['id']}") Type guard
def valid_properties(event):
return (
isinstance(event.get("opacity"), (int, float))
and 0 <= event["opacity"] <= 100
and isinstance(event.get("composite"), int)
and 0 <= event["composite"] <= 100
) Try / catch
try:
apply_placements(tl, pool, placements, ...)
except RuntimeError as e:
if "could not set" in str(e):
key, eid = str(e).split()[3], str(e).split()[5]
print(f"property {key} rejected for {eid}; check Resolve-accepted values")
else:
raise Prevention
- Store opacity as float 0-100 and CompositeMode as Resolve's integer enum only.
- Probe SetProperty with a scratch timeline item once per Resolve version.
- Validate plan JSON against a schema that enforces numeric property types.
When it happens
Trigger: Passing a CompositeMode value outside Resolve's accepted set (0-100 integer enum, e.g. 'overlay' string or 7 when unsupported), passing Opacity as a string or out of 0-100, or a Resolve build silently failing SetProperty on a freshly appended item.
Common situations: Plan JSON with composite modes copied from another tool's naming; opacity given as '50' (string) instead of 50.0; Resolve version where a composite mode enum was added/removed.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- could not append
- could not create overlay track
- could not import
- unexpected overlay items after append
- base_track_count exceeds target video tracks
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/25c548bdd74e6904.
Report an issue: GitHub.
Appendix: source
Thrown at skills/taste-application/scripts/tasteforge/resolve.py:301
{
"mediaPoolItem": imported[0],
"startFrame": 0,
"endFrame": event["frames"] - (source_end_mode == "inclusive"),
"mediaType": 1,
"trackIndex": event["track"],
"recordFrame": event["record_frame"],
}
]
)
if not items or len(items) != 1:
raise RuntimeError(f"could not append {event['id']}")
item = items[0]
for key, value in [
("Opacity", event["opacity"]),
("CompositeMode", event["composite"]),
]:
if not item.SetProperty(key, value):
raise RuntimeError(f"could not set {key} for {event['id']}")
_readback(timeline, item, event)
appended.append((event, item))
receipts = []
for event, item in appended:
actual = _readback(timeline, item, event)
receipts.append(
{
"id": event["id"],
"asset": event["asset"],
"requested": {
key: event[key]
for key in (
"record_frame",
"frames",
"track",
"opacity",
"composite",
)View on GitHub (pinned to 8321021c54)