问题:doccano初始化时出现错误:找不到wait_for_db命令,

ql3eal8s  于 2个月前  发布在  其他
关注(0)|答案(1)|浏览(25)

我遇到了doccano安装的问题,初始化无法正常工作。

如何重现问题

pip install doccano
doccano init

错误信息

[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'

你的运行环境

  • 操作系统:Linux WSL (5.10.16.3-microsoft-standard-WSL2) Ubuntu 20.04 LTS
  • Python版本:Python 3.9.12
  • 你是如何安装doccano的(如Heroku按钮等):通过pip install doccano进行安装
cqoc49vn

cqoc49vn1#

当我尝试在一个包含Django项目的文件夹中使用Doccano时,遇到了这个错误。看起来Doccano使用Django来设置数据库和用户认证。一旦我切换到另一个目录,一切就开始正常工作了。

相关问题