Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check for /usr/share/fonts/truetype directory and provided an a… #117

Closed
wants to merge 1 commit into from

Conversation

Nlar
Copy link

@Nlar Nlar commented Jan 30, 2024

When running under Arch Linux received an error:

Received an error:
[ERROR] An error occurred while retrieving information for the 'CR Select Font' node.
Traceback (most recent call last):
  File "[redacted]/ComfyUI/server.py", line 420, in get_object_info
    out[x] = node_info(x)
             ^^^^^^^^^^^^
  File "[redacted]/ComfyUI/server.py", line 398, in node_info
    info['input'] = obj_class.INPUT_TYPES()
                    ^^^^^^^^^^^^^^^^^^^^^^^
  File "[redacted]/ComfyUI/custom_nodes/ComfyUI_Comfyroll_CustomNodes/nodes/nodes_graphics_text.py", line 467, in INPUT_TYPES
    file_list = [f for f in os.listdir(font_dir) if os.path.isfile(os.path.join(font_dir, f)) and f.lower().endswith(".ttf")]
                            ^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/fonts/truetype'

The directory (/usr/share/fonts/truetype) doesn't not exist on my system and probably for other Arch Linux users as shown in example structure (https://wiki.archlinux.org/title/fonts#Manual_installation). After change fonts appear in Select Font node.

…lternative if that directory does not exist.
@Nlar
Copy link
Author

Nlar commented Mar 20, 2024

This patch is duplicated in other PR requests as stated in #124 and fixed in #123

@Nlar Nlar closed this Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant