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

Issue with "Expecting property name enclosed in double quotes" Error #53

Open
chillzzone opened this issue Dec 22, 2023 · 4 comments
Open

Comments

@chillzzone
Copy link

Hi - I hope this post finds you well!

I'm writing to seek assistance with a challenging error that I've encountered while working on my AnimateDiffusion ComfyUI project. Any help or guidance would be greatly appreciated.

Error occurred when executing BatchPromptSchedule: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

File "C:\Users\home\ComfyUI\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "C:\Users\home\ComfyUI\ComfyUI\execution.py", line 83, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "C:\Users\home\ComfyUI\ComfyUI\execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "C:\Users\home\ComfyUI\ComfyUI\custom_nodes\ComfyUI_FizzNodes\ScheduledNodes.py", line 122, in animate
animation_prompts = json.loads(inputText.strip())
File "json\__init__.py", line 346, in loads
File "json\decoder.py", line 337, in decode
File "json\decoder.py", line 353, in raw_decode

Thanks so much!!

@chillzzone
Copy link
Author

Also I have a prompt with a structure like this:

"0": "prompt"

Which has worked in the past...

I'm beginning to wonder if there could be any limitations on the length of the prompt itself?

Currently, my prompt contains approximately 20,000 frames of data. Could such a long prompt length potentially contribute to the error I've been encountering?

@FizzleDorf
Copy link
Owner

FizzleDorf commented Jan 26, 2024

I have a feeling there might have been a missed comma or quote somewhere in the prompt. Try using ctrl + f with either to be absolutely sure. You can always post the prompt here or in DMs if you would like to keep the prompt private and I can help debug

@revolutioncom123
Copy link

i am getting the same problem too.I tried to write in other ways but i keep getting the same problem.

error:

Error occurred when executing BatchPromptSchedule:

Expression 0 0.50
1 0.51
2 0.53
3 0.54
4 0.55
...
59 1.30
60 1.30
61 1.30
62 1.30
63 1.30
Length: 64, dtype: float64 has forbidden control characters.
File "G:\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "G:\ComfyUI\execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "G:\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "G:\ComfyUI\custom_nodes\ComfyUI_FizzNodes\ScheduledNodes.py", line 125, in animate
pos_cur_prompt, pos_nxt_prompt, weight = interpolate_prompt_series(pos, max_frames, start_frame, pre_text, app_text, pw_a, pw_b, pw_c, pw_d, print_output)
File "G:\ComfyUI\custom_nodes\ComfyUI_FizzNodes\BatchFuncs.py", line 153, in interpolate_prompt_series
cur_prompt_series[i] = prepare_batch_prompt(cur_prompt_series[i], max_frames, i, prompt_weight_1,
File "G:\ComfyUI\custom_nodes\ComfyUI_FizzNodes\BatchFuncs.py", line 25, in prepare_batch_prompt
parsed_value = numexpr.evaluate(parsed_string)
File "G:\ComfyUI\venv\lib\site-packages\numexpr\necompiler.py", line 977, in evaluate
raise e
File "G:\ComfyUI\venv\lib\site-packages\numexpr\necompiler.py", line 874, in validate
_names_cache[expr_key] = getExprNames(ex, context, sanitize=sanitize)
File "G:\ComfyUI\venv\lib\site-packages\numexpr\necompiler.py", line 723, in getExprNames
ex = stringToExpression(text, {}, context, sanitize)
File "G:\ComfyUI\venv\lib\site-packages\numexpr\necompiler.py", line 283, in stringToExpression
raise ValueError(f'Expression {s} has forbidden control characters.')

My texts:

Batch Value Schedule:
0: (0.50), 1: (0.51), 2: (0.53), 3: (0.54), 4: (0.55), 5: (0.56), 6: (0.57), 7: (0.59), 8: (0.60), 9: (0.61), 10: (0.63), 11: (0.64), 12: (0.65), 13: (0.66), 14: (0.67), 15: (0.69), 16: (0.70), 17: (0.71), 18: (0.73), 19: (0.74), 20: (0.75), 21: (0.76), 22: (0.77), 23: (0.79), 24: (0.80), 25: (0.85), 26: (0.90), 27: (0.95), 28: (1.00), 29: (1.05), 30: (1.10), 31: (1.15), 32: (1.20), 33: (1.21), 34: (1.21), 35: (1.22), 36: (1.22), 37: (1.23), 38: (1.24), 39: (1.24), 40: (1.25), 41: (1.26), 42: (1.26), 43: (1.27), 44: (1.28), 45: (1.28), 46: (1.29), 47: (1.29), 48: (1.30)

Batch Prompt Schedule:

text:
"0": "(smile:pw_a)",
"24": "(sad:pw_a)",
"48": "(angry:pw_a)"

max frame:48

@cleophusm
Copy link

I doubt you're still trying to figure this out but for anyone in the future, my issue was the types of quotation marks being used. On the Mac keyboard the quotation marks are slanted “0” but in BatchPromptSchedule it looks like it only likes straight quotation marks like this "0"

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

No branches or pull requests

4 participants