mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-11-04 23:37:31 +00:00
[PR #2119] [MERGED] Fix JSON serialization error in bulk import fail info API #2293
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/ComfyUI-Manager#2293
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/ComfyUI-Manager/pull/2119
Author: @viva-jinyi
Created: 9/1/2025
Status: ✅ Merged
Merged: 9/3/2025
Merged by: @ltdrdata
Base:
draft-v4← Head:fix/import-bulk-api-error📝 Commits (2)
3546cebfix: import failed info bulk api bug fix93813bbfix: Remove unused ImportFailInfoBulkResponse import📊 Changes
1 file changed (+12 additions, -6 deletions)
View changed files
📝
comfyui_manager/glob/manager_server.py(+12 -6)📄 Description
Problem
The
/v2/customnode/import_fail_info_bulkendpoint was throwing a JSON serialization error:Root Cause
The error occurred due to a mismatch between the internal data structure and the API specification:
Internal data structure (
cm_global.error_dict):API spec expects (
ImportFailInfoItem):The code was trying to serialize the Pydantic model
ImportFailInfoBulkResponsewhich contained incompatible data structures, causing the serialization failure.Solution
cm_global.error_dictformat to match the API specificationmsgfield toerrorfieldtracebackfield when not presentChanges Made
Added data transformation in the bulk endpoint to convert error dict format:
Removed problematic Pydantic model serialization:
return web.json_response(response_data.root)return web.json_response(results, content_type="application/json")Testing
Tested with the following curl command and confirmed it returns proper JSON response without errors:
Impact
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.