receyuki / comfyui-prompt-reader-node

The ultimate solution for managing image metadata and multi-tool compatibility. ComfyUI node version of the SD Prompt Reader
MIT License
289 stars 22 forks source link

[BUG] - Reader Node Will Not install through ComfyUI Manager #41

Closed tlaw81 closed 10 months ago

tlaw81 commented 10 months ago

Description

I have removed all other custom nodes, thinking that it might be a conflict with another one, but it continues to fail installation.

### Loading: ComfyUI-Manager (V1.25.2)
### ComfyUI Revision: 1881 [af94eb14] | Released on '2024-01-06'
FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json
Traceback (most recent call last):
  File "/Users/username/AI/ComfyUI/nodes.py", line 1810, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/username/AI/ComfyUI/custom_nodes/comfyui-prompt-reader-node/__init__.py", line 1, in <module>
    from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
  File "/Users/username/AI/ComfyUI/custom_nodes/comfyui-prompt-reader-node/nodes.py", line 35, in <module>
    from .stable_diffusion_prompt_reader.sd_prompt_reader.image_data_reader import (
  File "/Users/username/AI/ComfyUI/custom_nodes/comfyui-prompt-reader-node/stable_diffusion_prompt_reader/sd_prompt_reader/image_data_reader.py", line 185
    match image_format:
          ^
SyntaxError: invalid syntax

Cannot import /Users/username/AI/ComfyUI/custom_nodes/comfyui-prompt-reader-node module for custom nodes: invalid syntax (image_data_reader.py, line 185)

Import times for custom nodes:
   0.0 seconds (IMPORT FAILED): /Users/username/AI/ComfyUI/custom_nodes/comfyui-prompt-reader-node

Reproduction steps

No response

Image file

image
receyuki commented 10 months ago

This is because you installed ComfyUI using a Python version lower than 3.10, and SD Prompt Reader utilises some syntax that was introduced in Python 3.10.

The official installation instruction for ComfyUI uses Python 3.11, so I assumed nobody would use a Python version lower than 3.10.

tlaw81 commented 10 months ago

You're right. I was very confused by all of the python versions installed on my Mac. I figured it out with your help. Thank you!