• url传值错误


    ValueError at /add/

    invalid literal for int() with base 10: '‘6’'
    Request Method: GET
    Request URL: http://127.0.0.1:8000/add/?a=6&b=%E2%80%986%E2%80%99
    Django Version: 1.11
    Exception Type: ValueError
    Exception Value:
    invalid literal for int() with base 10: '‘6’'
    Exception Location: D:hackPython我的学习Djangoweb1calcviews.py in add, line 6
    Python Executable: C:Usersjumz-GAppDataLocalProgramsPythonPython35-32python.exe
    Python Version: 3.5.0
    Python Path:
    ['D:\hack\Python\我的学习\Django\web1',
     'C:\Users\jumz-G\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django-1.11-py3.5.egg',
     'C:\Users\jumz-G\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pytz-2016.10-py3.5.egg',
     'C:\Users\jumz-G\AppData\Local\Programs\Python\Python35-32\python35.zip',
     'C:\Users\jumz-G\AppData\Local\Programs\Python\Python35-32\DLLs',
     'C:\Users\jumz-G\AppData\Local\Programs\Python\Python35-32\lib',
     'C:\Users\jumz-G\AppData\Local\Programs\Python\Python35-32',
     'C:\Users\jumz-G\AppData\Local\Programs\Python\Python35-32\lib\site-packages']
    Server time: Sat, 24 Dec 2016 11:08:55 +0000

    他是这么报错的

    我们穿的值是6和‘6’!

    但是在我们的代码里面 都会把它int()

    c=str(int(a)*int(b))

  • 相关阅读:
    Mybatis插入数据时 返回主键
    React 子组件state内数组修改页面不刷新问题
    React 配合echarts使用问题记录
    vue 项目启动报错
    React Ant design table表单与pagination分页配置
    React Cascader组件实现地址选择
    os常用指令
    React 页面间传参
    React Router配置
    react项目 npm run eject报错
  • 原文地址:https://www.cnblogs.com/juemz/p/6218164.html
Copyright © 2020-2023  润新知