The get_client_ip function has a bug
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.
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
Yes, I couldn't find it either.
Fixed by #2427, which is in comfyui-manager since 4.0.4: get_client_ip takes the first two values of the peer name, so the four values of an IPv6 address are read as well.
Please open a new issue if it still happens on a current version.