First the exception and then I'll tell you about my work flow (and attach a PNG).
Exception:
Error occurred when executing DPRandomGenerator:
'charmap' codec can't encode character '\u014d' in position 59: character maps to
File "C:\Users\Eric\repos\Stable-Diffusion\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all)
File "C:\Users\Eric\repos\Stable-Diffusion\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "C:\Users\Eric\repos\Stable-Diffusion\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "C:\Users\Eric\repos\Stable-Diffusion\ComfyUI\custom_nodes\comfyui-dynamicprompts\nodes\sampler.py", line 100, in get_prompt print(f"New prompt: {new_prompt}")
File "C:\Users\Eric\repos\Stable-Diffusion\ComfyUI\custom_nodes\ComfyUI-Manager\prestartup_script.py", line 24, in write self.file.write(message)
File "C:\Program Files\Python310\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0]
My workflow (PNG) attached uses several wildcard files. The one I suspect is an artists.txt file (from https://github.com/rikkar69/SDXL-artist-study) that might contain Unicode characters for the artists' names. I extracted out those names, based on the problematic character, into a given file and reproduced the issue.
Repro:
Environment:
Win10 machine with ComfyUI setup that has generated hundreds of images. git pull fresh as of 8/13/2023 5pm PST.
ComfyUI-Manager, dynamicprompts, and WAS nodes installed.
Steps
Create a flow with the Random node and create a prompt that refers to a file with the suspect character ō - example file testArtists.txt attached.
Execute the flow
Expect:
Generation of image
Result:
Python exception while custom node attempts to write out the generated prompt.
Current comfyui-dynamicprompts repo that I'm sync'd to:
(I will say, looking at the stack I'm not familiar w/ the presence of ComfyUI-Manager, which I do have installed, like lots of folks, for managing my custom node extensions.)
Let me know if you need anymore info. Thanks.
Attached: (1) original flow that eventually caused the issue (2) a wildcard file, testArtists.txt, that will directly repro the issue if referred to in a random prompt.
First the exception and then I'll tell you about my work flow (and attach a PNG).
Exception:
My workflow (PNG) attached uses several wildcard files. The one I suspect is an artists.txt file (from https://github.com/rikkar69/SDXL-artist-study) that might contain Unicode characters for the artists' names. I extracted out those names, based on the problematic character, into a given file and reproduced the issue.
Repro:
Environment:
Steps
Expect:
Result:
Current comfyui-dynamicprompts repo that I'm sync'd to:
(I will say, looking at the stack I'm not familiar w/ the presence of ComfyUI-Manager, which I do have installed, like lots of folks, for managing my custom node extensions.)
Let me know if you need anymore info. Thanks.
Attached: (1) original flow that eventually caused the issue (2) a wildcard file, testArtists.txt, that will directly repro the issue if referred to in a random prompt.
testArtists.txt