adieyal / dynamicprompts

Templating language for generating prompts for text to image generators such as Stable Diffusion
MIT License
124 stars 20 forks source link

lexica.art API Time-out #118

Closed lingondricka2 closed 9 months ago

lingondricka2 commented 9 months ago

It worked 2 days ago, if this is a temporary thing does it happen often?

Traceback (most recent call last):
  File "C:\Users\lingo\AppData\Local\Programs\Python\Python311\Lib\site-packages\dynamicprompts\generators\feelinglucky.py", line 49, in generate
    data = query_lexica(query)
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\lingo\AppData\Local\Programs\Python\Python311\Lib\site-packages\dynamicprompts\generators\feelinglucky.py", line 27, in query_lexica
    response.raise_for_status()
  File "C:\Users\lingo\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 504 Server Error: Gateway Time-out for url: https://lexica.art/api/v1/search?q=cat%20in%20wizard%20outfit%20casting%20a%20spell,%20dramatic,%20magic%20effects,%20cute

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\lingo\Desktop\ComfyUI\custom_nodes\ComfyScript\scripts\Randomizer\randomize.py", line 373, in <module>
    pos_cond = CLIPTextEncode(get_positive_prompt(), clip)
                              ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\lingo\Desktop\ComfyUI\custom_nodes\ComfyScript\scripts\Randomizer\randomize.py", line 101, in get_positive_prompt
    prompt = FeelingLucky(prompt)
             ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\lingo\Desktop\ComfyUI\custom_nodes\ComfyScript\scripts\Randomizer\randomize.py", line 92, in FeelingLucky
    prompt = lucky_generator.generate(prompt, num_prompts)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\lingo\AppData\Local\Programs\Python\Python311\Lib\site-packages\dynamicprompts\generators\feelinglucky.py", line 54, in generate
    raise GeneratorException(f"Error while generating prompt: {e}") from e
dynamicprompts.generators.promptgenerator.GeneratorException: Error while generating prompt: 504 Server Error: Gateway Time-out for url: https://lexica.art/api/v1/search?q=cat%20in%20wizard%20outfit%20casting%20a%20spell,%20dramatic,%20magic%20effects,%20cute
akx commented 9 months ago

It's impossible for us to tell how often there might be a server error on Lexica's end, sorry.

If Lexica working is critical to your artistic workflow, it might be worth reconsidering that...