django報錯must be str, not dict

Django出現報錯

TypeError at /main/mmp/workticket/create/app/
must be str, not dict
Request Method: GET
Request URL:    http://127.0.0.1:8000/main/mmp/workticket/create/app/
Django Version: 2.1
Exception Type: TypeError
Exception Value:    must be str, not dict

最後定位的報錯是

D:\GITLAB\cloudnest\cloudnest\mmp\views.py in get
                print('Level1:' + x) ...
▶ Local vars

明顯的出現在print上,x是一個字典,不能直接打印,需要打印的話,強制轉換爲str類型。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章