a year ago
Hello,
I am encountering an error while running my Django project. The issue appears to be related to the use of the 'collections' module, specifically an AttributeError: 'collections' has no attribute 'Iterator'. Below is the traceback:
AttributeError: module 'collections' has no attribute 'Iterator'
File "/opt/venv/lib/python3.10/site-packages/django/db/models/fields/init.py", line 155, in init
if isinstance(choices, collections.Iterator):
It seems the collections.Iterator is no longer supported in Python 3.10 and needs to be replaced with collections.abc.Iterator.
I am using Python 3.10.7 and Django. Could you provide guidance on how to resolve this issue? Thank you.
ⓘ Deployment information is only viewable by project members and Railway employees.
1 Replies
Status changed to Closed brody • over 1 year ago