Closed ingski closed 2 years ago
The error is due because staritng from Python 3.7 Sequnce has been moved to collections.abc I fixed on mine adding in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/easygui/boxes/choice_box.py after import declarations
try:
collectionsAbc = collections.abc
except AttributeError:
collectionsAbc = collections
and then replacing in the file collections
with collectionsAbc
I don't know if it is the best solution but it worked with me
I now fixed it by replacing in the file collections with collections.abc
Seems to have been fixed in https://github.com/robertlugg/easygui/commit/a3391a3d896c88992c65233ae1819262b76c261a
Yep, this one should be fixed now. Thank you for reporting it!
import easygui easygui.choicebox("Text", choices = ['a', 'b'])
results in Error:
Traceback (most recent call last): File "./dummy.py", line 2, in
easygui.choicebox("Text", choices = ['a', 'b'])
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/easygui/boxes/choice_box.py", line 38, in choicebox
mb = ChoiceBox(msg, title, choices, preselect=preselect,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/easygui/boxes/choice_box.py", line 123, in init
preselect_list = make_list_or_none(preselect, cast_type=int)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/easygui/boxes/choice_box.py", line 95, in make_list_or_none
if not isinstance(obj, collections.Sequence):
AttributeError: module 'collections' has no attribute 'Sequence'