diff --git a/doc/history.md b/doc/history.md index bb07c2f..d2ddad7 100644 --- a/doc/history.md +++ b/doc/history.md @@ -1,3 +1,7 @@ +## 3.45.0 + * Update minecraft-data to 3.45.0 + * UnicodeDecodeError when loading data for some minecraft versions on windows + ## 3.20.0 * Update minecraft-data to 3.20.0 diff --git a/minecraft_data/data b/minecraft_data/data index 7b784ac..9d545f9 160000 --- a/minecraft_data/data +++ b/minecraft_data/data @@ -1 +1 @@ -Subproject commit 7b784ac5e983a23f9570b485cdcf854d48517eb6 +Subproject commit 9d545f99a6aa8921f89c05de9a65f2a1ce6515a6 diff --git a/minecraft_data/tools.py b/minecraft_data/tools.py index eb4ffcd..1377778 100644 --- a/minecraft_data/tools.py +++ b/minecraft_data/tools.py @@ -4,7 +4,7 @@ def convert(_dir, version, edition ='pc'): - with open(os.path.join(_dir, 'dataPaths.json')) as f: + with open(os.path.join(_dir, 'dataPaths.json'), encoding='utf-8') as f: datapaths = json.load(f) data = _grabdata(_dir, datapaths[edition][version]) ret = {} @@ -49,7 +49,7 @@ def commondata(_dir, edition = 'pc'): common_path = os.path.join(_dir, edition, 'common') for common_file in os.listdir(common_path): key = common_file.split('.', 1)[0] - 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: data = json.load(f) ret.update({key: data}) return ret @@ -60,7 +60,7 @@ def _grabdata(_dir, datapaths): for category, folder in datapaths.items(): path = os.path.join(_dir, folder, f'{category}.json') if os.path.isfile(path): - with open(path) as fp: + with open(path, encoding='utf-8') as fp: data[category] = json.load(fp) return data diff --git a/setup.py b/setup.py index d985d5d..6aef489 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ def package_files(directory): description='Provide easy access to minecraft data in python', license='MIT', long_description=open('README.rst').read(), - version='3.20.0', + version='3.45.0', maintainer='Vito Gamberini', maintainer_email='vito@gamberini.email', url='https://github.com/SpockBotMC/python-minecraft-data',