Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type object 'BaseCommand' has no attribute 'option_list' #219

Open
ipworkx opened this issue Jan 6, 2021 · 0 comments
Open

type object 'BaseCommand' has no attribute 'option_list' #219

ipworkx opened this issue Jan 6, 2021 · 0 comments

Comments

@ipworkx
Copy link

ipworkx commented Jan 6, 2021

Hi,

At thie moment of writing I have added LDAP to the scirius application. Therefor I needed to install "python-pyldap" using apt-get and add "django-auth-ldap" using pip
Then I added the LDAP stuff in the local_settings.py. This is fine now.
But when I added the module "django-auth-ldap", django was upgraded to version 1.11 which does not contain the "option_list" attribute.
This error can be generated by doing the following:

root@box# source /usr/share/python/scirius/bin/activate
(scirius) root@box# manage.py dbbackup
Traceback (most recent call last):
File "/usr/share/python/scirius/bin/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/usr/share/python/scirius/local/lib/python2.7/site-packages/django/core/management/init.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/share/python/scirius/local/lib/python2.7/site-packages/django/core/management/init.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/share/python/scirius/local/lib/python2.7/site-packages/django/core/management/init.py", line 206, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/usr/share/python/scirius/local/lib/python2.7/site-packages/django/core/management/init.py", line 40, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/usr/share/python/scirius/local/lib/python2.7/site-packages/dbbackup/management/commands/dbbackup.py", line 17, in
from ._base import BaseDbBackupCommand
File "/usr/share/python/scirius/local/lib/python2.7/site-packages/dbbackup/management/commands/_base.py", line 9, in
class BaseDbBackupCommand(LabelCommand):
File "/usr/share/python/scirius/local/lib/python2.7/site-packages/dbbackup/management/commands/_base.py", line 13, in BaseDbBackupCommand
option_list = BaseCommand.option_list + (
AttributeError: type object 'BaseCommand' has no attribute 'option_list'
(scirius) root@box#

It seems that 'option_list' was removed at django version 1.9.x.
I've tried to downgrade django by doing "pip install "Django==1.9.13", but this introduced into "No module named urls" when running dbbackup.

How to solve this?

Regards,

Thierry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant