[GH-ISSUE #2375] The get_client_ip function has a bug #947

Open
opened 2026-10-27 21:24:13 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @ZeeLyn on GitHub (Dec 10, 2025).
Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/2375

def get_client_ip(request):
    peername = request.transport.get_extra_info("peername")
    if peername is not None:
        host, port = peername
        return host
    
    return "unknown"

The variable peername sometimes returns a value like this ('127.0.0.1', 19260), and sometimes it returns like this ('::1', 28891, 0, 0), throwing an exception: "too many values ​​to unpack". My comfyui desktop is now unable to start normally.

Originally created by @ZeeLyn on GitHub (Dec 10, 2025). Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/2375 ```python def get_client_ip(request): peername = request.transport.get_extra_info("peername") if peername is not None: host, port = peername return host return "unknown" ``` The variable `peername` sometimes returns a value like this ('127.0.0.1', 19260), and sometimes it returns like this ('::1', 28891, 0, 0), throwing an exception: "too many values ​​to unpack". My comfyui desktop is now unable to start normally.
Author
Owner

@ZeyuanGuo commented on GitHub (Dec 22, 2025):

host, port = peername
can be fixed as :
host, *_ = peername
to solve it

however, i don't find where is the code in this repo to commit it
reported location is env name/lib/python3.12/site-packages/comfyui_manager/__init__.py", line 58, in get_client_ip

<!-- gh-comment-id:3681012605 --> @ZeyuanGuo commented on GitHub (Dec 22, 2025): ` host, port = peername ` can be fixed as : ` host, *_ = peername` to solve it however, i don't find where is the code in this repo to commit it reported location is `env name/lib/python3.12/site-packages/comfyui_manager/__init__.py", line 58, in get_client_ip`
Author
Owner

@ZeeLyn commented on GitHub (Dec 22, 2025):

Yes, I couldn't find it either.

<!-- gh-comment-id:3682025772 --> @ZeeLyn commented on GitHub (Dec 22, 2025): Yes, I couldn't find it either.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/ComfyUI-Manager#947
No description provided.