mirror of
https://github.com/modelscope/modelscope.git
synced 2026-07-13 05:48:59 +02:00
[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
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user