Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2021-01-04 22:36:32 +0300
committerJulien Duroure <julien.duroure@gmail.com>2021-01-04 22:36:32 +0300
commit48ec56bde5fcb7fc18352559d629ef486f1a5640 (patch)
treefb9d9824544a3b728fe16105b00fa0340e408f8a /io_scene_gltf2/io
parent70efc485eca862b7e191d17c4b4456402dd98d9f (diff)
glTF importer: removed future deprecated encoding arg to json.loads
Diffstat (limited to 'io_scene_gltf2/io')
-rwxr-xr-xio_scene_gltf2/io/imp/gltf2_io_gltf.py3
1 files changed, 2 insertions, 1 deletions
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])