Trung0246 / ComfyUI-0246

Random nodes for ComfyUI
MIT License
113 stars 11 forks source link

Loading issue with latest ComfyUI #40

Closed Danamir closed 3 months ago

Danamir commented 3 months ago

I got an error on load with ComfyUI version 2552[cd5017](2024-08-17) :

Traceback (most recent call last):
  File "F:\ComfyUI\nodes.py", line 1993, 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 "F:\ComfyUI\custom_nodes\ComfyUI-0246\__init__.py", line 1, in <module>
    from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
  File "F:\ComfyUI\custom_nodes\ComfyUI-0246\nodes.py", line 48, in <module>
    wat = wat = __import__("wat.inspection.inspection").inspection.inspection.inspect_format
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\ComfyUI\venv\Lib\site-packages\wat\inspection\inspection.py", line 438, in __getattr__
    raise AttributeError
AttributeError

Cannot import F:\ComfyUI\custom_nodes\ComfyUI-0246 module for custom nodes:
Trung0246 commented 3 months ago

Hi, I just updated my requirements.txt file that contains the new module. You may wants to update the extension or install module manually.

https://pypi.org/project/wat-inspector/

Danamir commented 3 months ago

Strange, I already have wat-inspector installed :

$ pip list | grep wat-inspector
wat-inspector              0.4.0

$ python
Python 3.11.8 (tags/v3.11.8:db85d51, Feb  6 2024, 22:03:32) [MSC v.1937 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from wat.inspection import inspection
>>> inspection.inspect_format
<function inspect_format at 0x0000022AB7650720>

>>> __import__("wat.inspection.inspection").inspection
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "F:\ComfyUI\venv\Lib\site-packages\wat\inspection\inspection.py", line 438, in __getattr__
    raise AttributeError
AttributeError. Did you mean: 'inspect'?

There seems to be a problem with the syntax __import__("wat.inspection.inspection") ?

Trung0246 commented 3 months ago

Looks like module path changed. I'll take a look later tonight.

Trung0246 commented 3 months ago

Fix has been pushed.

Danamir commented 3 months ago

Working, thanks !