hinablue / ComfyUI_3dPoseEditor

MIT License
140 stars 14 forks source link

invalid web extension management #1

Closed ltdrdata closed 8 months ago

ltdrdata commented 9 months ago

Attempting to delete a non-existent web extension path.

Traceback (most recent call last):
  File "/home/me/git/ComfyUI/nodes.py", line 1800, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/me/git/ComfyUI/custom_nodes/ComfyUI_3dPoseEditor/__init__.py", line 49, in <module>
    update_web()
  File "/home/me/git/ComfyUI/custom_nodes/ComfyUI_3dPoseEditor/__init__.py", line 25, in update_web
    shutil.rmtree(extensions_folder)
  File "/usr/lib/python3.11/shutil.py", line 722, in rmtree
    onerror(os.lstat, path, sys.exc_info())
  File "/usr/lib/python3.11/shutil.py", line 720, in rmtree
    orig_st = os.lstat(path, dir_fd=dir_fd)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/me/git/ComfyUI/web/extensions/ComfyUI_3dPoseEditor'

And instead of copying to the actual path of the web extension, it is recommended to use the following approach: https://github.com/ltdrdata/ComfyUI-Inspire-Pack/blob/c269c5c01a82dc5113c60fdfb482dee33727690a/__init__.py#L34

hinablue commented 8 months ago

I rewrote all the load method, now may work fine. VERY THANK YOU!!!

ltdrdata commented 8 months ago

Really nice work!