Fix: Object of type EnumMeta is not JSON serializable
Closed this issue · 0 comments
chrisbc commented
from CDC:
has there been a change to toshiAPI that would break creation of GTs? I'm trying to run some disaggs and get an error
==========================
mutation create_gt ($created:DateTime!, $agent_name:String!, $title:String!, $description:String!,
$argument_lists: [KeyValueListPairInput]!, $subtask_type:TaskSubType!, $subtask_count:Int!,
$model_type: ModelType!, $meta: [KeyValuePairInput]!) {
create_general_task (
input: {
created: $created
agent_name: $agent_name
title: $title
description: $description
argument_lists: $argument_lists
subtask_type: $subtask_type
subtask_count:$subtask_count
model_type: $model_type
meta:$meta
})
{
general_task {
id
}
}
}
and input variables:
{"created": "2024-06-20T03:49:49.068994+00:00", "agent_name": "chrisdc", "title": "OpenQuake Disaggregation Calcs", "description": "Disaggregation NSHM_v1.0.4",
"argument_lists": [{"k": "hazard_model_id", "v": "NSHM_v1.0.4"},
{"k": "title", "v": "OpenQuake Disaggregation Calcs"},
{"k": "description", "v": "Disaggregation NSHM_v1.0.4"},
{"k": "task_type", "v": "DISAGG"}
],
"subtask_type": "OPENQUAKE_HAZARD",
"subtask_count": 0,
"model_type": "COMPOSITE", "meta": []}
gql.transport.exceptions.TransportQueryError: {'message': 'Object of type EnumMeta is not JSON serializable', 'locations': [{'line': 2, 'column': 3}], 'path': ['create_general_task']}