Spaces:
Runtime error
Runtime error
Add debug logging for received image data
Browse filesLog type, length, and first 50 chars of the received base64 string
to diagnose truncation or format issues.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- api_server.py +1 -0
api_server.py
CHANGED
|
@@ -472,6 +472,7 @@ def create_fastapi_app():
|
|
| 472 |
return JSONResponse({"error": "Expected 7 parameters in data array"}, status_code=400)
|
| 473 |
|
| 474 |
image_base64 = data[0]
|
|
|
|
| 475 |
auto_axis = bool(data[1])
|
| 476 |
downsample_mode = str(data[2])
|
| 477 |
max_points = int(data[3])
|
|
|
|
| 472 |
return JSONResponse({"error": "Expected 7 parameters in data array"}, status_code=400)
|
| 473 |
|
| 474 |
image_base64 = data[0]
|
| 475 |
+
print(f" Received image string: type={type(image_base64)}, len={len(image_base64) if isinstance(image_base64, str) else 'N/A'}, first 50 chars: {str(image_base64)[:50]}")
|
| 476 |
auto_axis = bool(data[1])
|
| 477 |
downsample_mode = str(data[2])
|
| 478 |
max_points = int(data[3])
|