run manage.py task的错误提示

来源:4-9 operation models.py设计

清风落叶

2018-04-09

python3.6.2+Django2.0.3  提示错误,但运行命令又能正常使用,求教bobby老师这个错误提示是什么意思呢?

http://img.mukewang.com/szimg/5acb4f520001f97b03000206.jpg


Failed to get real commands on module "onlineEdu": python process died with code 1: Traceback (most recent call last):
  File "I:\soft\pycharm20170105\PyCharm 2017.1.5\helpers\pycharm\_jb_manage_tasks_provider.py", line 28, in <module>
    parser.report_data(dumper, commands_to_skip)
  File "I:\soft\pycharm20170105\PyCharm 2017.1.5\helpers\pycharm\django_manage_commands_provider\_parser\parser.py", line 90, in report_data
    module_to_use.process_command(dumper, command, parser)
  File "I:\soft\pycharm20170105\PyCharm 2017.1.5\helpers\pycharm\django_manage_commands_provider\_parser\_argparse.py", line 43, in process_command
    argument_info = (1, _utils.get_opt_type(action))
  File "I:\soft\pycharm20170105\PyCharm 2017.1.5\helpers\pycharm\django_manage_commands_provider\_parser\_utils.py", line 20, in get_opt_type
    assert isinstance(opt.choices, list), "Choices should be list"
AssertionError: Choices should be list

写回答

1回答

bobby

2018-04-10

你的models设计中的Choices 参数不是list或者tuple你看看你的源码

0
2
bobby
回复
清风落叶
好的, 这个都能让你发现
2018-04-12
共2条回复

Python3.6+django+xadmin,打造在线教育平台

【毕设】Python 2.7到3.6 完美适配,Django升级2.0

3677 学习 · 4041 问题

查看课程