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:\hack\Python\我的学习\Django\web1\calc\views.py in add, line 6 |
Python Executable: | C:\Users\jumz-G\AppData\Local\Programs\Python\Python35-32\python.exe |
Python Version: | 3.5.0 |
Python Path: | ['D:\\hack\\Python\\我的学习\\Django\\web1', |
Server time: | Sat, 24 Dec 2016 11:08:55 +0000 |
他是这么报错的
我们穿的值是6和‘6’!
但是在我们的代码里面 都会把它int()
c=str(int(a)*int(b))