Spaces:
Running on Zero
Running on Zero
Commit ·
d8fbb30
1
Parent(s): 84cc585
debug: log SSE data shape and fix misleading success:false log
Browse filesmsg.success doesn't exist in Gradio 5 SSE protocol — completion/error
is signalled via msg.output.error. Log the actual error field and dump
out.data[0]/[1] shape so we can verify the video URL extraction path.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -2128,6 +2128,8 @@ _GLOBAL_JS = """
|
|
| 2128 |
if (msg.msg === 'process_generating' || msg.msg === 'process_completed') {
|
| 2129 |
var out = msg.output;
|
| 2130 |
if (out && out.data) {
|
|
|
|
|
|
|
| 2131 |
// data[0] = video update, data[1] = waveform HTML update
|
| 2132 |
var vidUpdate = out.data[0];
|
| 2133 |
var waveUpdate = out.data[1];
|
|
@@ -2174,7 +2176,8 @@ _GLOBAL_JS = """
|
|
| 2174 |
var lbl = document.getElementById('wf_seglabel_' + slot_id);
|
| 2175 |
if (lbl) lbl.textContent = msg.output && msg.output.error ?
|
| 2176 |
'Error regenerating' : 'Done';
|
| 2177 |
-
|
|
|
|
| 2178 |
|
| 2179 |
// Apply video src AFTER Gradio/Svelte finishes its own re-render cycle.
|
| 2180 |
// We try at 50ms, 300ms, and 800ms to catch whenever Svelte settles.
|
|
|
|
| 2128 |
if (msg.msg === 'process_generating' || msg.msg === 'process_completed') {
|
| 2129 |
var out = msg.output;
|
| 2130 |
if (out && out.data) {
|
| 2131 |
+
console.log('[fireRegen] SSE data[0]:', JSON.stringify(out.data[0]).slice(0,200),
|
| 2132 |
+
' data[1]:', JSON.stringify(out.data[1]).slice(0,80));
|
| 2133 |
// data[0] = video update, data[1] = waveform HTML update
|
| 2134 |
var vidUpdate = out.data[0];
|
| 2135 |
var waveUpdate = out.data[1];
|
|
|
|
| 2176 |
var lbl = document.getElementById('wf_seglabel_' + slot_id);
|
| 2177 |
if (lbl) lbl.textContent = msg.output && msg.output.error ?
|
| 2178 |
'Error regenerating' : 'Done';
|
| 2179 |
+
var hadError = !!(msg.output && msg.output.error);
|
| 2180 |
+
console.log('[fireRegen] completed for', slot_id, 'error:', hadError, msg.output && msg.output.error || '');
|
| 2181 |
|
| 2182 |
// Apply video src AFTER Gradio/Svelte finishes its own re-render cycle.
|
| 2183 |
// We try at 50ms, 300ms, and 800ms to catch whenever Svelte settles.
|