Skip to content

Fix RemoteScriptError in clip_slot callback (logger.info format args)#213

Open
fortunto2 wants to merge 1 commit into
ideoforms:masterfrom
fortunto2:fix/clip-slot-logger-format
Open

Fix RemoteScriptError in clip_slot callback (logger.info format args)#213
fortunto2 wants to merge 1 commit into
ideoforms:masterfrom
fortunto2:fix/clip-slot-logger-format

Conversation

@fortunto2

Copy link
Copy Markdown

Fixes #212.

clip_slot.py's clip_slot_callback logs with:

self.logger.info(track_index, clip_index, rv)

Logger.info() treats its first argument as a format string, so passing three values raises TypeError: not all arguments converted during string formatting while emitting the record — a full RemoteScriptError traceback is written to Live's Log.txt on every /live/clip_slot/... message (get / start_listen / fire / stop).

Controllers that subscribe to many clip slots (to mirror is_playing / is_triggered across a grid) therefore flood the log and noticeably stall Live and the controller at startup.

This one-line change uses a proper format string:

self.logger.info("clip_slot %s %s -> %s", track_index, clip_index, rv)

device.py's equivalent callback has no such line, and track.py / scene.py already use %-formatted strings, so clip_slot.py was the only affected handler.

`Logger.info()` expects a format string as its first argument, but the
clip_slot callback passed three values (two ints + the return value):

    self.logger.info(track_index, clip_index, rv)

This raises `TypeError: not all arguments converted during string
formatting` while emitting the record, so a full RemoteScriptError
traceback is written to Live's Log.txt on every `/live/clip_slot/...`
message (get / start_listen / fire / stop). Subscribing to many clip
slots floods the log and stalls Live + the controller at startup.

Use a proper format string instead. device.py has no such line and
track.py / scene.py already use %-formatting — clip_slot.py was the
only handler affected.

Fixes ideoforms#212

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@CLAassistant

CLAassistant commented Jun 20, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

clip_slot callback raises RemoteScriptError on every message (logger.info called with non-format args)

2 participants