Browse Source

[to #42322933] specify ast scan file open encoding

Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10090797

    * [to #42322933] specify ast scan file open encoding
master
yingda.chen 3 years ago
parent
commit
e9eeb05bcd
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modelscope/utils/ast_utils.py

+ 1
- 1
modelscope/utils/ast_utils.py View File

@@ -394,7 +394,7 @@ class AstScaning(object):

def generate_ast(self, file):
self._refresh()
with open(file, 'r') as code:
with open(file, 'r', encoding='utf8') as code:
data = code.readlines()
data = ''.join(data)



Loading…
Cancel
Save