factorstudios commited on
Commit
3b7c726
·
verified ·
1 Parent(s): 29822dc

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +8 -25
server.py CHANGED
@@ -386,31 +386,14 @@ async def _compose(manifest: ManifestRequest):
386
  )
387
 
388
  # Filter out numpy warnings from stderr
389
- error_msg = result.stderr or result.stdout
390
- if error_msg:
391
- lines = error_msg.split("\n")
392
- # Filter out numpy and importlib warnings
393
- errors = [
394
- line for line in lines
395
- if line.strip() and not any(
396
- skip in line for skip in [
397
- "numpy",
398
- "Numpy",
399
- "MINGW-W64",
400
- "CRASHES ARE TO BE EXPECTED",
401
- "RuntimeWarning",
402
- "importlib",
403
- "getlimits",
404
- "nextafter",
405
- "ld(",
406
- "exp2",
407
- "log10",
408
- ]
409
- )
410
- ]
411
- if errors and result.returncode != 0:
412
- error_summary = "\n".join(errors[-5:]) # Last 5 meaningful lines
413
- raise Exception(f"Composer failed: {error_summary}")
414
 
415
  # Verify output file exists
416
  output_file = RENDERS_DIR / "sunset_reel.mp4"
 
386
  )
387
 
388
  # Filter out numpy warnings from stderr
389
+ # Only treat stderr as error if returncode is non-zero
390
+ if result.returncode != 0:
391
+ error_msg = result.stderr or result.stdout
392
+ if error_msg:
393
+ # Get last few meaningful lines
394
+ lines = [line for line in error_msg.split("\n") if line.strip()]
395
+ error_summary = "\n".join(lines[-3:])
396
+ raise Exception(f"Composer failed with code {result.returncode}: {error_summary}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
397
 
398
  # Verify output file exists
399
  output_file = RENDERS_DIR / "sunset_reel.mp4"