You help with the API, error at the basic_api_example.py
Hello, a query, I was looking at the file of
basic_api_example.py
But it gives me a "(error)"
.
Traceback (Most Recent Call Last):
File "c: \ ia \ comfyu 3 \ comfyui_windows_portable \ comfyui \ script_examples \ basic_api_example.py", line 118, in
I was thinking of doing some things automatically, How to launch a work previously done and saved in the .json file and I see that in the example of the API the internal is masomenes, but the example of API does not work, I guess I evolve a lot from the last version, I have added the command -they are and have also tried to put the local IP to see if it worked but either.
Now, as I have different versions of Comfyui, for example I wanted to launch some things to each other to another, (for example where the reactor works for me)
Is there a way to do something like that? Does anyone understand why the API fails? Or can you think of how to send him. Json and what generates it? (I imagine the road there is the API) greetings and thanks.
Theme separate (Does anyone know how to fix the reactor for the new version?)
Hi, I'm having the same issue. Did you solve it?
Hi, I'm having the same issue. Did you solve it?
I got it fixed by correcting a typo anyways...
I got it fixed by correcting a typo anyways...
any details, thx
Try using code like this
def queue_prompt(prompt): # p = {"prompt": prompt} # data = json.dumps(p).encode('utf-8') # req = request.Request("http://127.0.0.1:8188//prompt", data=data) # request.urlopen(req) response = requests.post("http://127.0.0.1:8188/prompt", json={"prompt": prompt}) print(response.status_code, response.text)
response = requests.post("http://127.0.0.1:8188/prompt", json={"prompt": prompt}) print(response.status_code, response.text)
seems work to me.