[PR #1393] [MERGED] Fix NameError in get_custom_nodes_paths method #1882

Closed
opened 2026-10-28 21:05:08 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/ComfyUI-Manager/pull/1393
Author: @yhayano-ponotech
Created: 1/3/2025
Status: ✅ Merged
Merged: 1/4/2025
Merged by: @ltdrdata

Base: main ← Head: bugfix


📝 Commits (1)

  • 8e06e00 Fix NameError in get_custom_nodes_paths method

📊 Changes

1 file changed (+13 additions, -1 deletions)

View changed files

📝 cm-cli.py (+13 -1)

📄 Description

Summary

Fixed an error in the get_custom_nodes_paths method where the folder_paths module could not be found.

Changes Made

  • Added a class variable folder_paths to the Ctx class.
  • Dynamically imported the folder_paths module in the __init__ method.
  • Updated the get_custom_nodes_paths method to use the class variable folder_paths.

Reason for the Fix

The get_custom_nodes_paths method raised a NameError: name 'folder_paths' is not defined because the folder_paths module was not found. This fix properly imports the module and resolves the error.

Test Results

After the fix, the cm-cli.py script worked as expected. Specifically, the restore-dependencies command no longer encountered errors.

This improvement enhances the stability and reliability of the ComfyUI Manager.
Your review would be greatly appreciated.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/ComfyUI-Manager/pull/1393 **Author:** [@yhayano-ponotech](https://github.com/yhayano-ponotech) **Created:** 1/3/2025 **Status:** ✅ Merged **Merged:** 1/4/2025 **Merged by:** [@ltdrdata](https://github.com/ltdrdata) **Base:** `main` ← **Head:** `bugfix` --- ### 📝 Commits (1) - [`8e06e00`](https://github.com/Comfy-Org/ComfyUI-Manager/commit/8e06e0058a07d7982757877cc5bb55409d5b37d6) Fix NameError in get_custom_nodes_paths method ### 📊 Changes **1 file changed** (+13 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `cm-cli.py` (+13 -1) </details> ### 📄 Description ## Summary Fixed an error in the `get_custom_nodes_paths` method where the `folder_paths` module could not be found. ## Changes Made - Added a class variable `folder_paths` to the `Ctx` class. - Dynamically imported the `folder_paths` module in the `__init__` method. - Updated the `get_custom_nodes_paths` method to use the class variable `folder_paths`. ## Reason for the Fix The `get_custom_nodes_paths` method raised a `NameError: name 'folder_paths' is not defined` because the `folder_paths` module was not found. This fix properly imports the module and resolves the error. ## Test Results After the fix, the `cm-cli.py` script worked as expected. Specifically, the `restore-dependencies` command no longer encountered errors. This improvement enhances the stability and reliability of the ComfyUI Manager. Your review would be greatly appreciated. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-28 21:05:08 +00:00
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#1882
No description provided.