Open BenDes21 opened 6 months ago
This issue was caused by an error with the command 'python.exe', '-s', '-m', 'pip', 'freeze'. I resolved the problem by modifying parts of the code.
Replace the function packages in the WAS_Node_Suite.py file with the following code to resolve the issue.
There is no error in the command, just incorrectly installing ComfyUI and not using virtualenv site packages, but instead system packages, which is dangerous.
The command expects a normal ComfyUI in a normal venv or portable environment.
This issue was caused by an error with the command 'python.exe', '-s', '-m', 'pip', 'freeze'. I resolved the problem by modifying parts of the code.
Replace the function packages in the WAS_Node_Suite.py file with the following code to resolve the issue.
This worked for me. Thank you.
Hello, Im trying to install the was node but comfyui mark the import as failed. Anyone know how to fix this issue ? Thanks
WAS Node Suite: Created default conf file at", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\custom_nodes\was-node-suite-comfyui__init__.py", line 1, in
from .WAS_Node_Suite import NODE_CLASS_MAPPINGS
File "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py", line 14068, in
if 'opencv-python' in packages() or 'opencv-python-headless' in packages():
File "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py", line 334, in packages
return [( r.decode().split('==')[0] if not versions else r.decode() ) for r in subprocess.check_output([sys.executable, '-s', '-m', 'pip', 'freeze']).split()]
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 421, in check_output
return run( popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\Users\Admin\AppData\Local\Programs\Python\Python310\python.exe', '-s', '-m', 'pip', 'freeze']' returned non-zero exit status 2.
C:\Users\Admin\Documents\Stable diffusion\ComfyUI\custom_nodes\was-node-suite-comfyui\was_suite_config.json
. ERROR: Exception: Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\base_command.py", line 180, in exc_logging_wrapper status = run_func(args) File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\commands\freeze.py", line 98, in run for line in freeze( File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\operations\freeze.py", line 43, in freeze req = FrozenRequirement.from_dist(dist) File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\operations\freeze.py", line 238, in from_dist req, comments = _get_editable_info(dist) File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\operations\freeze.py", line 165, in _get_editable_info vcs_backend = vcs.get_backend_for_dir(location) File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\vcs\versioncontrol.py", line 238, in get_backend_for_dir repo_path = vcs_backend.get_repository_root(location) File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\vcs\git.py", line 501, in get_repository_root r = cls.run_command( File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\vcs\versioncontrol.py", line 650, in run_command return call_subprocess( File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\utils\subprocess.py", line 141, in call_subprocess proc = subprocess.Popen( File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 971, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1456, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, NotADirectoryError: [WinError 267] The directory name is invalid Traceback (most recent call last): File "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\nodes.py", line 1879, in load_custom_node module_spec.loader.exec_module(module) File "Cannot import C:\Users\Admin\Documents\Stable diffusion\ComfyUI\custom_nodes\was-node-suite-comfyui module for custom nodes: Command '['C:\Users\Admin\AppData\Local\Programs\Python\Python310\python.exe', '-s', '-m', 'pip', 'freeze']' returned non-zero exit status 2.