question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Django 1.10 compatibility: AttributeError: type object 'BaseCommand' has no attribute 'option_list'`

See original GitHub issue

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:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
blagcommented, Aug 29, 2016

Should be fixed in 6998752f85242b8923973c7bc90eed50a7aa4a47. Can you test that by cloning this repo? That commit hasn’t been pushed to PyPI yet. Thanks!

0reactions
blagcommented, Sep 2, 2016

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found