diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2021-01-04 22:36:32 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2021-01-04 22:36:32 +0300 |
commit | 48ec56bde5fcb7fc18352559d629ef486f1a5640 (patch) | |
tree | fb9d9824544a3b728fe16105b00fa0340e408f8a | |
parent | 70efc485eca862b7e191d17c4b4456402dd98d9f (diff) |
glTF importer: removed future deprecated encoding arg to json.loads
-rwxr-xr-x | io_scene_gltf2/__init__.py | 2 | ||||
-rwxr-xr-x | io_scene_gltf2/io/imp/gltf2_io_gltf.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 127ea6e5..319c9c17 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -15,7 +15,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (1, 5, 10), + "version": (1, 5, 11), 'blender': (2, 91, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/io_scene_gltf2/io/imp/gltf2_io_gltf.py b/io_scene_gltf2/io/imp/gltf2_io_gltf.py index 5bbab579..348f8904 100755 --- a/io_scene_gltf2/io/imp/gltf2_io_gltf.py +++ b/io_scene_gltf2/io/imp/gltf2_io_gltf.py @@ -61,7 +61,8 @@ class glTFImporter(): def bad_constant(val): raise ImportError('Bad glTF: json contained %s' % val) try: - return json.loads(bytes(content), encoding='utf-8', parse_constant=bad_constant) + text = str(content, encoding='utf-8') + return json.loads(text, parse_constant=bad_constant) except ValueError as e: raise ImportError('Bad glTF: json error: %s' % e.args[0]) |