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类型。
原文地址:http://blog.51cto.com/ipcpu/2178804
时间: 2024-08-24 18:05:35