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

Error Response 500 when generating images #2668

Open
antondanv opened this issue Feb 1, 2025 · 2 comments
Open

Error Response 500 when generating images #2668

antondanv opened this issue Feb 1, 2025 · 2 comments
Assignees
Labels
bug Something isn't working stale

Comments

@antondanv
Copy link

Code:

from g4f.client import Client

def gen_img(prompt="dog"):
    client = Client()

    response = client.images.generate(
        model="midjourney",
        prompt=prompt,
        width=1080,
        height=720,
        response_format="url")

    image_url = response.data[0].url
    print(f"Generated image URL: {image_url}")

gen_img()

Error:
File "C:\Users\", line 184, in _generate_image await raise_for_status(response) File "C:\Users\", line 42, in raise_for_status_async raise ResponseStatusError(f"Response {response.status}: {message}") g4f.errors.ResponseStatusError: Response 500:

When generating images, an error of 500 occurs every other time, I tried different models, but the error does not disappear

@antondanv antondanv added the bug Something isn't working label Feb 1, 2025
@phoen1x-dev
Copy link

Code:

from g4f.client import Client

def gen_img(prompt="dog"):
    client = Client()

    response = client.images.generate(
        model="midjourney",
        prompt=prompt,
        width=1080,
        height=720,
        response_format="url")

    image_url = response.data[0].url
    print(f"Generated image URL: {image_url}")

gen_img()

Error: File "C:\Users\", line 184, in _generate_image await raise_for_status(response) File "C:\Users\", line 42, in raise_for_status_async raise ResponseStatusError(f"Response {response.status}: {message}") g4f.errors.ResponseStatusError: Response 500:

When generating images, an error of 500 occurs every other time, I tried different models, but the error does not disappear

It seems there are issues with the PollinationsAI server, possibly due to overload. I have the same thing.

Copy link

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

@github-actions github-actions bot added the stale label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants