PlaintextParser incompatibility with Python 3.10, easy fix
Closed this issue · 2 comments
Hello,
I wanted to share an issue with sumy version 0.8.1 where running from sumy.parsers.plaintext import PlaintextParser
gives the error: 'Cannot import Sequence from collections'. The easy fix for this for me was simply going into my local library site packages for python 3.10, then to sumy/models/tf.py and changing the imports to from collections.abc import Sequence
. This fix works because collections is deprecated for python 3.10 with collections.abc being the functional module. A newer version of sumy could address this problem.
Thank you!
Thank you for the info but this is already fixed in aa05246#diff-7c62c7257cd337067015fa1297b8bc1358b9e442790789baa9f08d110631db3bR10 released as a new version. I suggest you to update the sumy to the latest version.
Ah, so it seems that pip was recently updated, and users should update pip in order to implicitly install the newest version of sumy and inherit this fix. Users who have also run into this problem should update pip then update sumy. Thanks again :)