[GH-ISSUE #117] Request to add fileno() to Logger Class #65

Closed
opened 2026-10-27 21:12:34 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @theelefant on GitHub (Sep 26, 2023).
Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/117

I'd like to request the addition of a fileno() method to the Logger class in prestartup_script.py:

def fileno(self):
    try:
        if self.is_stdout:
            return original_stdout.fileno()
        else:
            return original_stderr.fileno()
    except AttributeError:
        # Handle error
        raise ValueError("The object does not have a fileno method")

This is to avoid the following error raised by other ComfyUI nodes which require the fileno() method:

AttributeError: 'Logger' object has no attribute 'fileno'
Originally created by @theelefant on GitHub (Sep 26, 2023). Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/117 I'd like to request the addition of a `fileno()` method to the `Logger` class in `prestartup_script.py`: ```python def fileno(self): try: if self.is_stdout: return original_stdout.fileno() else: return original_stderr.fileno() except AttributeError: # Handle error raise ValueError("The object does not have a fileno method") ``` This is to avoid the following error raised by other ComfyUI nodes which require the `fileno()` method: ```javascript AttributeError: 'Logger' object has no attribute 'fileno' ```
Author
Owner

@ltdrdata commented on GitHub (Sep 26, 2023):

This is patched on 7d6109aa6c

<!-- gh-comment-id:1735604517 --> @ltdrdata commented on GitHub (Sep 26, 2023): This is patched on 7d6109aa6c0f6f1d482cebe314aa2939044a5f39
Author
Owner

@Nuked88 commented on GitHub (Sep 27, 2023):

Thanks!

<!-- gh-comment-id:1737983044 --> @Nuked88 commented on GitHub (Sep 27, 2023): Thanks!
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#65
No description provided.