use explicit utf-8 encoding when opening files in text mode
This commit is contained in:
@@ -64,7 +64,7 @@ class WsClientThread(util.DaemonThread):
|
||||
# read json file
|
||||
rdir = self.config.get('requests_dir')
|
||||
n = os.path.join(rdir, 'req', request_id[0], request_id[1], request_id, request_id + '.json')
|
||||
with open(n) as f:
|
||||
with open(n, encoding='utf-8') as f:
|
||||
s = f.read()
|
||||
d = json.loads(s)
|
||||
addr = d.get('address')
|
||||
|
||||
Reference in New Issue
Block a user