From 3d7cb6a41935baf2c711833998731b0c91d6f293 Mon Sep 17 00:00:00 2001 From: "St.Huang" Date: Tue, 25 Sep 2018 19:36:43 +0800 Subject: [PATCH] fix #62 --- addons/fastwq/service/manager.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/fastwq/service/manager.py b/addons/fastwq/service/manager.py index 35f8ca0..15bf7e9 100644 --- a/addons/fastwq/service/manager.py +++ b/addons/fastwq/service/manager.py @@ -65,7 +65,12 @@ class ServiceManager(object): """ service_path = u'dict' web_services, local_custom_services = list(), list() - mypath = os.path.join(os.path.dirname(os.path.realpath(__file__)), service_path) + ufile = os.path.realpath(__file__) + try: + ufile = ufile.decode('gb2312').encode('utf8') + except UnicodeDecodeError: + pass + mypath = os.path.join(os.path.dirname(ufile), service_path) files = [ f for f in os.listdir(mypath) \ if f not in ('__init__.py') and \