Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing fails with Python 3.9 #1295

Closed
here-abarany opened this issue Dec 15, 2020 · 3 comments · Fixed by #1299
Closed

Importing fails with Python 3.9 #1295

here-abarany opened this issue Dec 15, 2020 · 3 comments · Fixed by #1299

Comments

@here-abarany
Copy link

Describe the bug
Python 3.9 removed the "encoding" parameter for json.loads(), leading to an unexpected keyword argument exception being thrown when attempting to load a glTF file.

To Reproduce
Steps to reproduce the behavior:

  1. Launch Blender with a system using Python 3.9.
  2. Import a glTF or glb file.

Expected behavior
File imports without error.

Screenshots
Screenshot_20201215_142414

Version

  • OS: Arch Linux
  • Blender Version 2.91

Additional context
Removing the encoding parameter in gltf_io_gltf.py line 64 fixes the issue.

@julienduroure
Copy link
Collaborator

Hello,
Blender is bundled with its own python interpreter, that is the only python version that is officially supported.
For 2.91, this is 3.7.7

@scurest
Copy link
Contributor

scurest commented Dec 16, 2020

From the 3.7 docs

The other arguments have the same meaning as in load(), except encoding which is ignored and deprecated.

encoding has been ignored since 3.1, so it should be deleted even in 3.7.

I only put the encoding= arg in in #1238 because I thought incorrectly that json.loads(str(json_bytes, encoding='utf-8')) was the same as json.loads(json_bytes, encoding='utf-8').

@makidoll
Copy link

I'm having this issue as well using Arch Linux with Python 3.9.1. I had to manually remove all encoding='utf8' in the plugin to get it to work for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants