Django runserver fails with "AttributeError: class must define a 'type' attribute" when using Python 3.13
python manage.py runserver
But I get the following traceback:
Traceback (most recent call last):
File "C:\Users\...\manage.py", line 22, in <module>
main()
...
File "...django\core\files\locks.py", line 32, in <module>
from ctypes import (
File "...\Python313\Lib\ctypes\__init__.py", line 157, in <module>
class py_object(_SimpleCData):
AttributeError: class must define a '_type_' attribute
How can I fix this?