Problem with the Polls Tutorial

Hi,

I’m running

python manage.py makemigrations polls

I get the following error message. I’m not even sure where to start.

I’ve received the same error inside my virtualenv and outside it. Outside of it I use Python3

I’m on a macOS Catalina 10.15.3

Thank you for any help!

Traceback (most recent call last):
File “manage.py”, line 21, in
main()
File “manage.py”, line 17, in main
execute_from_command_line(sys.argv)
File “/Users/zephyrmcintyre/Documents/django-project/venv/lib/python3.8/site-packages/django/core/management/init.py”, line 401, in execute_from_command_line
utility.execute()
File “/Users/zephyrmcintyre/Documents/django-project/venv/lib/python3.8/site-packages/django/core/management/init.py”, line 377, in execute
django.setup()
File “/Users/zephyrmcintyre/Documents/django-project/venv/lib/python3.8/site-packages/django/init.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “/Users/zephyrmcintyre/Documents/django-project/venv/lib/python3.8/site-packages/django/apps/registry.py”, line 114, in populate
app_config.import_models()
File “/Users/zephyrmcintyre/Documents/django-project/venv/lib/python3.8/site-packages/django/apps/config.py”, line 211, in import_models
self.models_module = import_module(models_module_name)
File “/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 671, in _load_unlocked
File “”, line 783, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/Users/zephyrmcintyre/Documents/django-project/djangoProject/polls/models.py”, line 9, in
class Choice(models.Model):
File “/Users/zephyrmcintyre/Documents/django-project/djangoProject/polls/models.py”, line 12, in Choice
vote = models.IntergerField(default=0)
AttributeError: module ‘django.db.models’ has no attribute ‘IntergerField’

Notice the very last line of the error report - it’s giving you the information you need:
AttributeError: module ‘django.db.models’ has no attribute ‘IntergerField’

It’s “IntegerField”, not “IntergerField” - you’ve got a typo in your field definition.

1 Like

OMG thank you, I feel really dumb.

I hope you are well!

Don’t sweat it, we’ve all “been there, done that”.

Ken

1 Like