Skip to content
Snippets Groups Projects
Commit 48ec56bd authored by Julien Duroure's avatar Julien Duroure
Browse files

glTF importer: removed future deprecated encoding arg to json.loads

parent 70efc485
No related branches found
No related tags found
No related merge requests found
......@@ -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',
......
......@@ -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])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment