etianen / django-watson

Full-text multi-table search application for Django. Easy to install and use, with good performance.
BSD 3-Clause "New" or "Revised" License
1.2k stars 130 forks source link

type object 'BaseCommand' has no attribute 'option_list' when doing buildwatson #168

Closed ivanadam closed 6 years ago

ivanadam commented 8 years ago

I did as it says in the getting started guide and when it comes to buildwatson this error comes up:

Traceback (most recent call last): File "manage.py", line 22, in <module> execute_from_command_line(sys.argv) File "D:\Program Files\Python\lib\site-packages\django-1.10a1-py3.5.egg\django\core\management\__init__.py", line 367, in execute_from_command_line utility.execute() File "D:\Program Files\Python\lib\site-packages\django-1.10a1-py3.5.egg\django\core\management\__init__.py", line 359, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "D:\Program Files\Python\lib\site-packages\django-1.10a1-py3.5.egg\django\core\management\__init__.py", line 208, in fetch_command klass = load_command_class(app_name, subcommand) File "D:\Program Files\Python\lib\site-packages\django-1.10a1-py3.5.egg\django\core\management\__init__.py", line 40, in load_command_class module = import_module('%s.management.commands.%s' % (app_name, name)) File "D:\Program Files\Python\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 986, in _gcd_import File "<frozen importlib._bootstrap>", line 969, in _find_and_load File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 673, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 662, in exec_module File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed File "D:\Program Files\Python\lib\site-packages\watson\management\commands\buildwatson.py", line 57, in <module> class Command(BaseCommand): File "D:\Program Files\Python\lib\site-packages\watson\management\commands\buildwatson.py", line 61, in Command option_list = BaseCommand.option_list + ( AttributeError: type object 'BaseCommand' has no attribute 'option_list'

etianen commented 8 years ago

What version of django are you using?

On Fri, 17 Jun 2016 at 11:56 ivanadam notifications@github.com wrote:

I did as it says in the getting started guide and when it comes to buildwatson this error comes up:

Traceback (most recent call last): File "manage.py", line 22, in execute_from_command_line(sys.argv) File "D:\Program Files\Python\lib\site-packages\django-1.10a1-py3.5.egg\django\core\managementinit.py", line 367, in execute_from_command_line utility.execute() File "D:\Program Files\Python\lib\site-packages\django-1.10a1-py3.5.egg\django\core\managementinit.py", line 359, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "D:\Program Files\Python\lib\site-packages\django-1.10a1-py3.5.egg\django\core\managementinit.py", line 208, in fetch_command klass = load_command_class(app_name, subcommand) File "D:\Program Files\Python\lib\site-packages\django-1.10a1-py3.5.egg\django\core\managementinit.py", line 40, in load_command_class module = import_module('%s.management.commands.%s' % (app_name, name)) File "D:\Program Files\Python\lib\importlibinit.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 986, in _gcd_import File "", line 969, in _find_and_load File "", line 958, in _find_and_load_unlocked File "", line 673, in _load_unlocked File "", line 662, in exec_module File "", line 222, in _call_with_frames_removed File "D:\Program Files\Python\lib\site-packages\watson\management\commands\buildwatson.py", line 57, in class Command(BaseCommand): File "D:\Program Files\Python\lib\site-packages\watson\management\commands\buildwatson.py", line 61, in Command option_list = BaseCommand.option_list + ( AttributeError: type object 'BaseCommand' has no attribute 'option_list'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/etianen/django-watson/issues/168, or mute the thread https://github.com/notifications/unsubscribe/AAJFCDZfRZ1Zy5BFfoQ709ahdZbcaUpGks5qMn1qgaJpZM4I4P9c .

ivanadam commented 8 years ago

I use 1.9.7 Is there a way to workaround this issue, since they probably deleted it, so i don't have to downgrade django and possibly make more problems with my project.

amureki commented 8 years ago

Instead of option_list it should be done now by add_argument for Django>1.7 (deprecated in 1.8).

@ivanadam you can try to make a pull request fixing this. Maybe I will find some time to make it on weekends.

etianen commented 8 years ago

A pull request would be appreciate, since I'm a bit bogged down with other stuff at present.

On Fri, 17 Jun 2016 at 13:31 Rustem Sayargaliev notifications@github.com wrote:

Instead of option_list it should be done now by add_argument https://docs.djangoproject.com/en/1.9/howto/custom-management-commands/#django.core.management.BaseCommand.option_list for Django>1.7 (deprecated in 1.8).

@ivanadam https://github.com/ivanadam you can try to make a pull request fixing this. Maybe I will find some time to make it on weekends.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/etianen/django-watson/issues/168#issuecomment-226756807, or mute the thread https://github.com/notifications/unsubscribe/AAJFCB36I130Hziq7ZG9gCV_rVNMhwHGks5qMpOWgaJpZM4I4P9c .

ivanadam commented 8 years ago

I'm new to github so I don't really know how to do that, in fact I just signed up to report this issue, so can someone do that instead or tell me what to do.

etianen commented 8 years ago

No worries, thanks for reporting the issue, in any case. This issue will be attended to in time. :)

If you'd like to contribute more to the project, have a google for Github pull requests, and I'm sure you'll find something useful. I'm also happy to help if you have specific questions about anything django-watson related.

On Fri, 17 Jun 2016 at 15:59 ivanadam notifications@github.com wrote:

I'm new to github so I don't really know how to do that, in fact I just signed up to report this issue, so can someone do that instead or tell me what to do.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/etianen/django-watson/issues/168#issuecomment-226792708, or mute the thread https://github.com/notifications/unsubscribe/AAJFCGbCnTcrQSDJ8XrEL_n6MOnjQYduks5qMrZKgaJpZM4I4P9c .

FFX01 commented 7 years ago

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 out.

FFX01 commented 7 years ago

Nevermind. Just realized the version in the repo has the fix already. Could this change be pulled into the changes on PyPI?