Skip to content
TheChatArchiveThe Chat Archive
gpt-4-0125-preview· openaiHugging Face Suzhen/CodeChat

Traceback (most recent call last): File "D:\ComfyUI-aki-v1.1\execution.py", line 151, in…

  1. User

    Traceback (most recent call last): File "D:\ComfyUI-aki-v1.1\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "D:\ComfyUI-aki-v1.1\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "D:\ComfyUI-aki-v1.1\execution.py", line 65, in map_node_over_list results.append(getattr(obj, func)(**input_data_all)) File "D:\ComfyUI-aki-v1.1\custom_nodes\ComfyUI-Custom-Scripts\py\show_text.py", line 23, in notify if unique_id and extra_pnginfo and "workflow" in extra_pnginfo[0]: TypeError: argument of type 'NoneType' is not iterable

  2. Assistant

    The error you're encountering is happening because extra_pnginfo is None and you're attempting to check if "workflow" is in extra_pnginfo[0], which is not valid since None cannot be indexed or iterated over. This occurs in the show_text.py file, specifically in the notify function.

    Error message breakdown:

    • TypeError: argument of type 'NoneType' is not iterable indicates that an operation expected an iterable object (like a list, tuple, or string), but got a NoneType instead.

    To fix this issue, ensure that extra_pnginfo is neither None nor empty before trying to access its elements or iterate over it. Here's how you might adjust the notify function to include a check for None and ensure it's a list or another iterable before proceeding:

    def notify(self, unique_id, extra_pnginfo):
        # First, check if `extra_pnginfo` is not None and is iterable 
        if extra_pnginfo is not None and isinstance(extra_pnginfo, (list, tuple)):
            # Then, proceed to check if "workflow" is in the first element of `extra_pnginfo`
            if unique_id and "workflow" in extra_pnginfo[0]:
                # The rest of your code goes here
                pass
    

    With this adjustment, the code first checks whether extra_pnginfo is not None and also confirms that it is an instance of either a list or tuple, which are iterable. This way, you prevent the error by ensuring that you're not trying to iterate over or index into None.

    Remember, this is a starting point. Depending on your specific requirements or the nature of extra_pnginfo, you might need to adjust the condition. If extra_pnginfo can be other iterable types beyond lists or tuples, you might need a more comprehensive check.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.