We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 299d38a commit c59ea55Copy full SHA for c59ea55
minecraft_data/tools.py
@@ -4,7 +4,7 @@
4
5
6
def convert(_dir, version, edition ='pc'):
7
- with open(os.path.join(_dir, 'dataPaths.json')) as f:
+ with open(os.path.join(_dir, 'dataPaths.json'), encoding='utf-8') as f:
8
datapaths = json.load(f)
9
data = _grabdata(_dir, datapaths[edition][version])
10
ret = {}
@@ -49,7 +49,7 @@ def commondata(_dir, edition = 'pc'):
49
common_path = os.path.join(_dir, edition, 'common')
50
for common_file in os.listdir(common_path):
51
key = common_file.split('.', 1)[0]
52
- with open(os.path.join(common_path, common_file)) as f:
+ with open(os.path.join(common_path, common_file), encoding='utf-8') as f:
53
data = json.load(f)
54
ret.update({key: data})
55
return ret
0 commit comments