Richard Young Claude commited on
Commit
d31350b
·
1 Parent(s): d658499

Fix 'too many values to unpack' error in corruption checker

Browse files

- diagnose_image_issue returns tuple (error_type, details), not dict
- Updated to properly unpack the tuple
- Fixed iteration logic to display error info correctly
- Fixes runtime error in Check Corruption tab

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -272,8 +272,8 @@ def check_image_corruption(image, sensitivity, check_visual):
272
  check_visual=check_visual
273
  )
274
 
275
- # Get diagnostic details
276
- issues = find_bad_images.diagnose_image_issue(image_path)
277
 
278
  # Clean up
279
  os.unlink(image_path)
@@ -301,9 +301,9 @@ The image passed all validation checks:
301
  The image has validation problems:
302
 
303
  """
304
- if issues:
305
- for issue_type, issue_desc in issues.items():
306
- result += f"**{issue_type}:**\n{issue_desc}\n\n"
307
  else:
308
  result += "❌ Image failed validation but no specific issues identified.\n\n"
309
 
 
272
  check_visual=check_visual
273
  )
274
 
275
+ # Get diagnostic details (returns tuple: error_type, details)
276
+ error_type, error_details = find_bad_images.diagnose_image_issue(image_path)
277
 
278
  # Clean up
279
  os.unlink(image_path)
 
301
  The image has validation problems:
302
 
303
  """
304
+ if error_type and error_details:
305
+ result += f"**Issue Type:** {error_type}\n\n"
306
+ result += f"**Details:** {error_details}\n\n"
307
  else:
308
  result += "❌ Image failed validation but no specific issues identified.\n\n"
309