From a3dcc0cbf0200229d5b9a38a1ccad44473811ed9 Mon Sep 17 00:00:00 2001 From: wuzewu Date: Tue, 3 Nov 2020 17:53:05 +0800 Subject: [PATCH] Fix server bug --- paddlehub/config.py | 2 +- paddlehub/server/server.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paddlehub/config.py b/paddlehub/config.py index 5d0bfa70..26b6f19b 100644 --- a/paddlehub/config.py +++ b/paddlehub/config.py @@ -113,7 +113,7 @@ def _load_old_config(config: HubConfig): with open(old_cfg_file) as file: try: cfg = json.loads(file.read()) - config.server = cfg['server_url'] + config.server = cfg['server_url'][0] config.log_level = cfg['log_level'] except: ... diff --git a/paddlehub/server/server.py b/paddlehub/server/server.py index c015db8d..a3fd822f 100644 --- a/paddlehub/server/server.py +++ b/paddlehub/server/server.py @@ -109,7 +109,7 @@ class HubServer(object): '''Get the version compatibility information of the model.''' sources = self.sources.values() if not source else [self._generate_source(source)] for source in sources: - result = source.get_module_info(name=name) + result = source.get_module_compat_info(name=name) if result: return result return {} -- GitLab