在“raise TypeError”(%s()获得意外的关键字参数“%s”)%(cls.\uu name_uugh,kwarg))

2021-02-25 04:12:25 发布

您现在位置:Python中文网/ 问答频道 /正文

board = Board(name='Django', description='This is a board about Django.')    

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/babak/myproject/venv/lib/python3.6/site-packages/django/db/models/base.py", line 501, in __init__
    raise TypeError("%s() got an unexpected keyword argument '%s'" % (cls.__name__, kwarg))
TypeError: Board() got an unexpected keyword argument 'description'