Closed Mikel0303 closed 3 years ago
Hmmm. this has to do with your Python version. It seems that collections.Iterable
is deprecated since Python 3.9.
I removed from collections import Iterable
according to deprecation warnings, and use from collections.abc import Iterable
directly.
@Mikel0303 could you check this with your Python 3.10 version - with the newest git - then I make a bugfix release ASAP.
Hi @nerdoc, thank you for this quick fix. I encountered the exact same issue when I upgraded the python version to 3.10. I tested to install pydifact from the git repo latest commit and it worked perfectly. No errors and no deprecation warnings anymore. Could you make the bugfix release ? Thanks in advance and have a good day :slightly_smiling_face:
OK, later today evening.
Done. @Wauplin @Mikel0303
Thanks !
"import pydifact" failed as module 'collections' does not seem to have an attribute 'Iterable'.
following the error message
File "/Users/mike2/Documents/Python3/EDI1.py", line 3, in
from pydifact.segmentcollection import Interchange
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pydifact/init.py", line 23, in
from pydifact import segmentcollection, parser, segments, serializer, token, tokenizer
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pydifact/segmentcollection.py", line 382, in
class Interchange(FileSourcableMixin, UNAHandlingMixin, AbstractSegmentsContainer):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pydifact/segmentcollection.py", line 498, in Interchange
cls, segments: Union[list, collections.Iterable]
AttributeError: module 'collections' has no attribute 'Iterable'