我试过很多办法了 都没法解决 各位大哥们帮忙看看代码见下mainDealer()函数def mainDealer(request):# post = request.POST.items()print("rawTarget =", request.POST["rawTarget"])target = reverse("myDetector:tempTest") + '?'argName = request.POST["paramName"]argPath = argName.split("?")[0]argName = argName.split("?")[1]# dealt by modellmModel = Judger.readModelFromFile(name=Judger.getFileName( argName, "2018119", "lm"), obj_hook=Judger.lmFromFile)cmModel = Judger.readModelFromFile(name=Judger.getFileName( argName, "2018119", "cm"), obj_hook=Judger.cmFromFile)lmPredictRst = lmModel.predict( samples=[ request.POST["paramValue"]], realRst=[])cmPredictRst = cmModel.predict( samples=[ request.POST["paramValue"]], realRst=[])judgeRst = {"lm": lmPredictRst[0], "cm": cmPredictRst[0]}if not judgeRst["lm"]: addNewMarkedValue(argName, request.POST["paramValue"], "lm", argPath)if not judgeRst["cm"]: addNewMarkedValue(argName, request.POST["paramValue"], "cm", argPath)#问题描述MultiValueDictKeyError at /myDetector/"'rawTarget'"Request Method:GETRequest URL:http://localhost:8000/myDetector/Django Version:1.11.7Exception Type:MultiValueDictKeyErrorException Value:"'rawTarget'"Exception Location:D:ProjecttestSitevenvlibsite-packagesdjangoutilsdatastructures.py in __getitem__, line 85Python Executable:D:ProjecttestSitevenvScriptspython.exePython Version:3.6.2Python Path:['D:\Project\malicoiusWebParamJudger\testSite','D:\Project\testSite\venv\Scripts\python36.zip','D:\Python\Python36\DLLs','D:\Python\Python36\lib','D:\Python\Python36','D:\Project\testSite\venv',Server time:Fri, 17 May 2019 09:58:33 +0800问题出现的环境背景及自己尝试过哪些方法尝试使用request.post.get() 但是没有用
添加回答
举报
0/150
提交
取消