Skip to content

Commit

Permalink
Update api_request_parallel_processor.py
Browse files Browse the repository at this point in the history
fixed bug for non-serializable Error
  • Loading branch information
Hannibal046 committed Apr 12, 2023
1 parent b658e8d commit ab0f7c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/api_request_parallel_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ async def call_api(
retry_queue.put_nowait(self)
else:
logging.error(f"Request {self.request_json} failed after all attempts. Saving errors: {self.result}")
append_to_jsonl([self.request_json, self.result], save_filepath)
append_to_jsonl([self.request_json, [str(e) for e in self.result]], save_filepath)
status_tracker.num_tasks_in_progress -= 1
status_tracker.num_tasks_failed += 1
else:
Expand Down

0 comments on commit ab0f7c1

Please sign in to comment.