Skip to content

500 Internal Server Error when using generations.list() API endpoint #153

@fegloff

Description

@fegloff

When attempting to list generations using the Python SDK, I'm consistently receiving a 500 Internal Server Error response.

Steps to Reproduce

  1. Set up the LumaAI client with proper authentication
  2. Call client.generations.list() with limit and offset parameters
  3. Handle possible exceptions

Code Example

from lumaai import LumaAI
import lumaai
import os

client = LumaAI(
    auth_token=os.environ.get("LUMAAI_API_KEY"), 
)

try:
    generation_list = client.generations.list(limit=100, offset=0)
    print(generation_list)
  
except lumaai.APIConnectionError as e:
    print("The server could not be reached")
    print(e.__cause__)  
except lumaai.RateLimitError as e:
    print("A 429 status code was received; we should back off a bit.")
except lumaai.APIStatusError as e:
    print("Another non-200-range status code was received")
    print(e.status_code)
    print(e.response)

Error Output

Another non-200-range status code was received
500
<Response [500 Internal Server Error]>

Environment

  • Python version: 3.10.13
  • LumaAI SDK version: 1.0.2 and 1.7.3
  • Operating System: iOS Sonma M1

Additional Information

  • I've verified my API key is correct and working for other endpoints
  • This occurs consistently when attempting to list generations
  • No additional error information is available in the response

Expected Behavior

The API should return a list of generations or a more specific error message if there's an issue with my request parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions