Django 1.10 compatibility: AttributeError: type object 'BaseCommand' has no attribute 'option_list'`
See original GitHub issueIssue Description
Hi,
I’m tried django-cities in Django 1.10, when I executed python manage.py cities --import=all
I had a problem of compatibility version of Django
File "....../env/local/lib/python2.7/site-packages/cities/management/commands/cities.py", line 55, in Command option_list = BaseCommand.option_list + ( AttributeError: type object 'BaseCommand' has no attribute 'option_list'
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
type object 'BaseCommand' has no attribute 'option_list ...
I have Python 2.7, Django 1.10 and django extensions 1.6.1 installed. Traceback (most recent call last): File "manage.py", line 10, in < ...
Read more >type object 'BaseCommand' has no attribute 'option_list' when ...
Getting the exact same issue with Django 1.10. I'll attempt to fix it and make a pull request if I can figure it...
Read more >type object 'BaseCommand' has no attribute 'option_list'-django
Coding example for the question Python Attribute Error when running script: type object 'BaseCommand' has no attribute 'option_list'-django.
Read more >Django 1.10 release notes
These release notes cover the new features, as well as some backwards incompatible changes you'll want to be aware of when upgrading from...
Read more >Django Deprecation Timeline — Django 4.1.4 documentation
This document outlines when various pieces of Django will be removed or altered in a backward incompatible way, following their deprecation, as per...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Should be fixed in 6998752f85242b8923973c7bc90eed50a7aa4a47. Can you test that by cloning this repo? That commit hasn’t been pushed to PyPI yet. Thanks!
You should NOT have to make migrations for Django-cities, that should already be done for you. There should be two migrations already created for you: 0001_initial and 0002_add continent_model_and_foreign_keys (or a similar name, I don’t remember exactly what it is and I’m on mobile).
Additionally, unless you’re upgrading from South, you shouldn’t need to fake any of the migrations.
But that error, where it doesn’t recognize the ‘–import’ flag is rather weird. I’ll have to dig into that on Monday. Thanks for the feedback!