diff --git a/feeluown/app/server_app.py b/feeluown/app/server_app.py index 858cdbf68..d815f5ac7 100644 --- a/feeluown/app/server_app.py +++ b/feeluown/app/server_app.py @@ -52,7 +52,11 @@ def run(self): self.config.PUBSUB_PORT, )) if self.config.ENABLE_WEB_SERVER: - from feeluown.webserver import run_web_server - asyncio.create_task( - run_web_server(self.get_listen_addr(), self.config.WEB_PORT)) + try: + from feeluown.webserver import run_web_server + except ImportError as e: + logger.error(f"can't enable webserver, err: {e}") + else: + asyncio.create_task( + run_web_server(self.get_listen_addr(), self.config.WEB_PORT)) asyncio.create_task(run_nowplaying_server(self))