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

Support for Python 3.10.x #689

Closed
lehthanis opened this issue Jan 31, 2022 · 8 comments
Closed

Support for Python 3.10.x #689

lehthanis opened this issue Jan 31, 2022 · 8 comments
Assignees

Comments

@lehthanis
Copy link

My linux system recently updated python to 3.10.2 and my XPlane2Blender stopped working. I originally thought it was due to changes in Blender 3.0.1, but after experimenting, I found that not to be the case. It turns out it's a simple issue with Importing Iterable in the xplane_types/xplane_keyframe_collection.py file.

Apparently Iterable has been moved now to collections.abc and in order to make XPlane2Blender compatible with the higher python versions, you'll need to modify the beginning of the file as follows:

in xplane_types/xplane_keyframe_collection.py

import copy
import math
from collections.abc import Iterable, MutableSequence
from collections import namedtuple
from typing import List, Tuple

Once doing this, I no longer have any problems running XPlane2Blender in blender 3.0.1 with Python 3.10.2.

@tngreene I imagine this problem would exist for older supported versions of blender on systems with newer python versions as well, but I'm not versed enough in python to be sure.

@jakep623
Copy link

My linux system recently updated python to 3.10.2 and my XPlane2Blender stopped working. I originally thought it was due to changes in Blender 3.0.1, but after experimenting, I found that not to be the case. It turns out it's a simple issue with Importing Iterable in the xplane_types/xplane_keyframe_collection.py file.

Apparently Iterable has been moved now to collections.abc and in order to make XPlane2Blender compatible with the higher python versions, you'll need to modify the beginning of the file as follows:

in xplane_types/xplane_keyframe_collection.py

import copy
import math
from collections.abc import Iterable, MutableSequence
from collections import namedtuple
from typing import List, Tuple

Once doing this, I no longer have any problems running XPlane2Blender in blender 3.0.1 with Python 3.10.2.

@tngreene I imagine this problem would exist for older supported versions of blender on systems with newer python versions as well, but I'm not versed enough in python to be sure.

Where is "xplane_types/xplane_keyframe_collection.py" located?

@lehthanis
Copy link
Author

@jakep623 in the extracted plugin's zip file. look at the source code of the plugin in github.

from collections import Iterable, namedtuple

@bsupnik bsupnik self-assigned this Mar 16, 2022
bsupnik pushed a commit that referenced this issue Mar 16, 2022
build type bumped to RC for 4.1.0-rc1.
@bsupnik
Copy link
Collaborator

bsupnik commented Mar 16, 2022

Fixed via fd456b7

@bsupnik bsupnik closed this as completed Mar 16, 2022
@jakep623
Copy link

@jakep623 in the extracted plugin's zip file. look at the source code of the plugin in github.

from collections import Iterable, namedtuple

Much appreciated. I just went into my file and it still didnt work, but I see 4.1.0-rc.1 is up. Thank you!

@jakep623
Copy link

Hello again,

I am having trouble importing X-Plane objects into blender with the latest release. Would it be possible to push the 4.20 alpha with the .py file fix? I tried swapping the file from the updated one, and also changing the header myself, not work!

Or a link to an importer I can add would be amazing too. TIA.

@RyanLee355
Copy link

Not sure if this is related, but I am too using Python 3.10.2 and Blender 3.0.1. Here, the importer does not show up at all whilst the exporter does. Functionality can't be confirmed. https://imgur.com/k3xLS4e

@bsupnik
Copy link
Collaborator

bsupnik commented May 14, 2022

@jakep623 the current 4.2.0 release candidate will work with new Python for exporting. It does not contain the importer. There is no current importer release.

@Migqle this is unrelated - the importer simply isn't in the releases.

@tparikka
Copy link

@tngreene is it possible to make this change to the v4.2.0-alpha.1 branch? I believe it's needed there as well.

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

No branches or pull requests

5 participants