mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-20 16:07:12 +08:00
check console error
This commit is contained in:
parent
2c49f65e42
commit
aa4024d393
7
.github/workflows/test-browser.yml
vendored
7
.github/workflows/test-browser.yml
vendored
@ -55,6 +55,13 @@ jobs:
|
|||||||
- name: Run Playwright tests
|
- name: Run Playwright tests
|
||||||
run: npx playwright test
|
run: npx playwright test
|
||||||
working-directory: ComfyUI_frontend
|
working-directory: ComfyUI_frontend
|
||||||
|
- name: Check for unhandled exceptions in server log
|
||||||
|
run: |
|
||||||
|
if grep -qE "Exception|Error" console_output.log; then
|
||||||
|
echo "Unhandled exception/error found in server log."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
working-directory: ComfyUI
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
|
|||||||
25
nodes.py
25
nodes.py
@ -1888,12 +1888,29 @@ NODE_DISPLAY_NAME_MAPPINGS = {
|
|||||||
|
|
||||||
EXTENSION_WEB_DIRS = {}
|
EXTENSION_WEB_DIRS = {}
|
||||||
|
|
||||||
|
def get_module_name(module_path: str) -> str:
|
||||||
|
"""
|
||||||
|
Returns the module name based on the given module path.
|
||||||
|
Examples:
|
||||||
|
get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node.py") -> "custom_nodes.my_custom_node"
|
||||||
|
get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node") -> "custom_nodes.my_custom_node"
|
||||||
|
get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node/") -> "custom_nodes.my_custom_node"
|
||||||
|
get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node/__init__.py") -> "custom_nodes.my_custom_node"
|
||||||
|
get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node/__init__") -> "custom_nodes.my_custom_node"
|
||||||
|
get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node/__init__/") -> "custom_nodes.my_custom_node"
|
||||||
|
get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node.disabled") -> "custom_nodes.my
|
||||||
|
Args:
|
||||||
|
module_path (str): The path of the module.
|
||||||
|
Returns:
|
||||||
|
str: The module name.
|
||||||
|
"""
|
||||||
|
relative_path = os.path.relpath(module_path, folder_paths.base_path)
|
||||||
|
if os.path.isfile(module_path):
|
||||||
|
relative_path = os.path.splitext(relative_path)[0]
|
||||||
|
return relative_path.replace(os.sep, '.')
|
||||||
|
|
||||||
def load_custom_node(module_path, ignore=set()):
|
def load_custom_node(module_path, ignore=set()):
|
||||||
module_name = os.path.basename(module_path)
|
module_name = get_module_name(module_path)
|
||||||
if os.path.isfile(module_path):
|
|
||||||
sp = os.path.splitext(module_path)
|
|
||||||
module_name = sp[0]
|
|
||||||
try:
|
try:
|
||||||
logging.debug("Trying to load custom node {}".format(module_path))
|
logging.debug("Trying to load custom node {}".format(module_path))
|
||||||
if os.path.isfile(module_path):
|
if os.path.isfile(module_path):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user