rgthree-comfy icon indicating copy to clipboard operation
rgthree-comfy copied to clipboard

SyntaxWarning: invalid escape sequence '\d'

Open MartinMoenks opened this issue 10 months ago • 1 comments

https://github.com/rgthree/rgthree-comfy/blob/32142fe476878a354dda6e2d4b5ea98960de3ced/py/power_prompt_utils.py#L11

bug: pattern = '<lora:([^:>]*?)(?::(-?\d*(?:\.\d*)?))?>'
fix: pattern = r'<lora:([^:>]*?)(?::(-?\d*(?:\.\d*)?))?>'

MartinMoenks avatar Feb 23 '25 12:02 MartinMoenks

Restarting ComfyUI fixes the problem no need to make this change.

RedsAnalysis avatar Mar 16 '25 08:03 RedsAnalysis

Restarting didn't help Python 3.12 has more strict syntax check. Next python it will be SyntaxError, not SyntaxWarning. @MartinMoenks suggestion is correct

de-served avatar May 24 '25 09:05 de-served

Thanks, I've fixed this.

rgthree avatar May 24 '25 23:05 rgthree