weixin_43526575 2021-04-15 11:45 采纳率: 0%
浏览 221
已结题

Django表单上传图片和文字,出现MultiValueDictKeyError错误,该怎么解决?

      <div class="col-md-6">
          <h3 style="font-family:STKaiTi;text-align:center;margin-bottom: 30px;" >人脸图截取</h3>
          <form action="" method="POST">

                 {% csrf_token %}
                <img  class="center" id="screenshot-img" src="" width="400px" height="300px"  style="margin-left: 65px">
                <input type="hidden"  id="ee" name="ee"  value="">
                <br/>
                <input class="center btn btn-warning"  type="submit" value="Analyse" style="margin-top:20px;margin-left: 225px">
                <input type="text" name="messageId111" placeholder="请输入签到的课程编号!" style="color:black;border-radius:5px;margin-left: 470px;">
          </form>
      </div>

 

 

MultiValueDictKeyError at /smessage1
'massageId111'
Request Method:    POST
Request URL:    http://127.0.0.1:8000/smessage1
Django Version:    3.2
Exception Type:    MultiValueDictKeyError
Exception Value:    
'massageId111'
Exception Location:    /home/zyx/.local/lib/python3.6/site-packages/django/utils/datastructures.py, line 78, in __getitem__
Python Executable:    /usr/bin/python3.6
Python Version:    3.6.13

  • 写回答

6条回答 默认 最新

  • CSDN专家-黄老师 2021-04-15 11:51
    关注

    debug一下你接收表单的视图函数,看看能否正常接收请求信息

    评论

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置