Skip to content

Fix Syntax Error in TBG_Refiner.py#67

Open
deadpipe wants to merge 2 commits into
Ltamann:TBG_ETUR_v1-1-0from
deadpipe:deadpipe-patch-1
Open

Fix Syntax Error in TBG_Refiner.py#67
deadpipe wants to merge 2 commits into
Ltamann:TBG_ETUR_v1-1-0from
deadpipe:deadpipe-patch-1

Conversation

@deadpipe
Copy link
Copy Markdown

@deadpipe deadpipe commented Apr 29, 2026

Thanks for sharing this custom node.

I just installed it and noticed a syntax error during startup.

Fixed it by replacing the inner double quotes ( " " ) with single quotes ( ' ' ) inside the f-strings


Error:

Traceback (most recent call last):
File "S:\AI Softwares\Comfy UI\ComfyUINew\ComfyUI\nodes.py", line 2216, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "S:\AI Softwares\Comfy UI\ComfyUINew\ComfyUI\custom_nodes\tbg-etur_init.py", line 70, in
from .py.v3.extension import comfy_entrypoint
File "S:\AI Softwares\Comfy UI\ComfyUINew\ComfyUI\custom_nodes\tbg-etur\py\v3_init_.py", line 1, in
from .extension import comfy_entrypoint
File "S:\AI Softwares\Comfy UI\ComfyUINew\ComfyUI\custom_nodes\tbg-etur\py\v3\extension.py", line 23, in
from ..nodes.UpscalerRefiner.TBG_Nodes_CE import (
File "S:\AI Softwares\Comfy UI\ComfyUINew\ComfyUI\custom_nodes\tbg-etur\py\nodes\UpscalerRefiner\TBG_Nodes_CE.py", line 16, in
from ..UpscalerRefiner.TBG_Refiner import TBG_Refiner_v1
File "S:\AI Softwares\Comfy UI\ComfyUINew\ComfyUI\custom_nodes\tbg-etur\py\nodes\UpscalerRefiner\TBG_Refiner.py", line 498
print(f"Tile Overrides set from JSON {len(tbg.OUTPUTS.grid_images_all)} Tiles and {len(obj.get("prompts"))} Prompts ")
^^^^^^^
SyntaxError: f-string: unmatched '('

and

print(f"Skipped json inputs from Tile Overrides Node because {len(tbg.OUTPUTS.grid_images_all)} Tiles have not the same count than {len(obj.get("prompts"))} Prompts, using PIPE ")
^^^^^^^
SyntaxError: f-string: unmatched '('

Added single quotes ( ' ' ) to fix syntax error
Added single quotes ( ' ' ) to fix syntax error
@Ltamann
Copy link
Copy Markdown
Owner

Ltamann commented May 17, 2026

What system are you using? I’m not seeing any issues on Windows ComfyUI 0.21 portable—could this be a Linux-only bug or it's a Python version compatibility issue that affects both platforms, but you might be running different Python versions. 3.12+ has no problem. Python Version Behavior
Python 3.11 and earlier:

F-strings cannot contain the same type of quote used to delimit the f-string itself

f"...{obj.get("prompts")}..." fails because the inner " closes the outer f-string prematurely

Python 3.12+:

F-strings were enhanced to allow quote reuse and more complex expressions

The same syntax would work fine

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.

2 participants