doccano
doccano copied to clipboard
Issue with `doccano init`: `wait_for_db` command not found
I have an issue with the doccano installation Init doesn't work.
How to reproduce the problem
pip install doccano
doccano init
Error message
[2022-12-28 10:43:27 +0000] [189] [INFO] [django_drf_filepond.apps::ready::61] App init: no django-storages backend configured, using default (local) storage backend if set, otherwise you need to manage file storage independently of this app.
Setup Database.
Traceback (most recent call last):
File "/home/jeremy/miniconda3/lib/python3.9/site-packages/django/core/management/__init__.py", line 114, in call_command
app_name = get_commands()[command_name]
KeyError: 'wait_for_db'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jeremy/miniconda3/bin/doccano", line 8, in <module>
sys.exit(main())
File "/home/jeremy/miniconda3/lib/python3.9/site-packages/backend/cli.py", line 177, in main
args.handler(args)
File "/home/jeremy/miniconda3/lib/python3.9/site-packages/backend/cli.py", line 74, in command_db_init
management.call_command("wait_for_db")
File "/home/jeremy/miniconda3/lib/python3.9/site-packages/django/core/management/__init__.py", line 116, in call_command
raise CommandError("Unknown command: %r" % command_name)
django.core.management.base.CommandError: Unknown command: 'wait_for_db'
Your Environment
- Operating System: Linux WSL (5.10.16.3-microsoft-standard-WSL2) Ubuntu 20.04 LTS
- Python Version Used: Python 3.9.12
- How did you install doccano (Heroku button etc): pip install doccano
I was getting this error when trying to use Doccano within a folder that had a Django project in it. It looks like Doccano uses Django to set up the database and user authentication. Once I switched to a different directory everything started working.