From 39b301d9dd947ef99139e38da985ef426cc68550 Mon Sep 17 00:00:00 2001 From: DavdGao Date: Sun, 4 Feb 2024 15:43:58 +0800 Subject: [PATCH] Add required package `docstring_parser` to setup.py --- setup.py | 2 +- src/agentscope/service/service_factory.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ae2189fa1..1cbc55a3a 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ "expiringdict", ] -service_requires = ["docker", "pymongo", "pymysql"] +service_requires = ["docstring_parser", "docker", "pymongo", "pymysql"] doc_requires = [ "sphinx", diff --git a/src/agentscope/service/service_factory.py b/src/agentscope/service/service_factory.py index b1b9e9d03..d717c6960 100644 --- a/src/agentscope/service/service_factory.py +++ b/src/agentscope/service/service_factory.py @@ -14,7 +14,10 @@ get_origin, ) -from docstring_parser import parse +try: + from docstring_parser import parse +except ImportError: + parse = None from loguru import logger