takaakiaoki / ofblockmeshdicthelper

Helper utilities for OpenFOAM blockMeshDict generation.
MIT License
21 stars 15 forks source link

issue with importing Iterable #16

Closed bekraoui closed 2 months ago

bekraoui commented 3 months ago

Traceback (most recent call last): File "geo.py", line 1, in from ofblockmeshdicthelper import BlockMeshDict, Vertex, SimpleGrading File "C:\Users\AAAA\AppData\Roaming\Python\Python312\site-packages\ofblockmeshdicthelper__init.py", line 6, in from collections import Iterable ImportError: cannot import name 'Iterable' from 'collections' (C:\Program Files\Python312\Lib\collections\init__.py)

solution:

https://stackoverflow.com/questions/72032032/importerror-cannot-import-name-iterable-from-collections-in-python

replace :

from collections import Iterable

by:

try:
    from collections.abc import Iterable
except ImportError:
    from collections import Iterable
bekraoui commented 2 months ago

my mistake. i installed for python3 zusing : pip install ofblockmeshdicthelper instead of : pip install 'ofblockmeshdicthelper @ git+https://github.com/takaakiaoki/ofblockmeshdicthelper.git'