Skip to content

KeyError: 'model' when processing data load in Data Formulator" #196

@ttnghia962

Description

@ttnghia962

When I try to load data into Data Formulator, the server returns a 500 error with stack trace showing KeyError: 'model'. It seems that the API call to /api/agent/process-data-on-load misses the 'model' key in the payload.

Environment:

  • Python version: 3.11
  • OS: Windows 11
  • Installed via pip

Steps to reproduce:

  1. Run command data_formulator
  2. Load a CSV or Excel file
  3. Perform data processing triggering API call /api/agent/process-data-on-load
  4. Observe the error in server logs

Log excerpt:
Traceback (most recent call last):
File ".../agent_routes.py", line 181, in process_data_on_load_request
client = get_client(content['model'])
KeyError: 'model'

Please advise on how to fix or if this is a bug.

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