jamiebull1 / geomeppy

GeomEppy is a scripting language for use with Eppy, which in turn is a scripting language for EnergyPlus IDF files and output files.
https://pypi.python.org/pypi/geomeppy
MIT License
38 stars 23 forks source link

ImportError: cannot import name 'MutableSequence' from 'collections' #264

Open Tokarzewski opened 1 year ago

Tokarzewski commented 1 year ago

In Python 3.11.3 I receive the following error ....
File "C:\GitHub\geomeppy\venv\Lib\site-packages\geomeppy\geom\polygons.py", line 2, in from collections import MutableSequence ImportError: cannot import name 'MutableSequence' from 'collections' (C:\Users\thinkpad\AppData\Local\Programs\Python\Python311\Lib\collections__init__.py)

In polygons.py, the line from collections import MutableSequence had to be changed to from collections.abc import MutableSequence

kksharma3951 commented 1 year ago

Even I am dacing this issue and haven't been able to resolve this

maynouf commented 1 year ago

@Tokarzewski @kksharma3951 I have proposed a fix in this PR, perhaps you can use it if you are rushed

MartinPaulo commented 1 month ago

I've also been hit by this defect. Is the pull request going to be accepted? Given that it's Oct 18th, 2024 I'm guessing that there is much urgency from the project team? I'm curious to know how @maynouf and others worked around this problem. It also means that this project is functionally dead, as Python 3.8 is no longer supported :(

maynouf commented 1 month ago

Hello Martin; a possible solution meanwhile is to:

  1. Fork yourself the project (or get my fork).
  2. Create a branch and make the changes.
  3. Install package in development mode pip install -e path (where path is the path to the root of the folder). Hope this helps!
MartinPaulo commented 1 month ago

Thanks @maynouf : my temporary workaround was to simply use your fork in my requirements file as follows:

geomeppy @ git+https://github.com/maynouf/geomeppy@fix-collections

This will get me through for the time being - thank you for creating the pull request!

I have a strong belief that this project should make it very clear on PyPi that it doesn't support Python > 3.8, and hence is essentially dead.

JoLo90 commented 1 month ago

jamiebull1 did an excellent job with this repo, and it would be a pity to see it slowly dying. Maybe we could add more maintainers to this repo. I could only contribute to two commits so far, but I would be happy to give some support.

maynouf commented 1 month ago

@JoLo90 I agree with you, this repo has been very useful for me so count me in for support / further development.