Python的Django框架入门踩过的坑(六)

传参数转类型错误int()在line 37





ValueError at /herolist/
invalid literal for int() with base 10: ''
Request Method: GET
Request URL: http://127.0.0.1:8000/herolist/
Django Version: 1.8.2
Exception Type: ValueError
Exception Value:
invalid literal for int() with base 10: ''
Exception Location: /home/python/Desktop/django/test5/booktest/views.py in HeroList, line 37
Python Executable: /home/python/.virtualenvs/h1/bin/python
Python Version: 2.7.12
Python Path:
['/home/python/Desktop/django/test5',
 '/home/python/.virtualenvs/h1/lib/python2.7',
 '/home/python/.virtualenvs/h1/lib/python2.7/plat-x86_64-linux-gnu',
 '/home/python/.virtualenvs/h1/lib/python2.7/lib-tk',
 '/home/python/.virtualenvs/h1/lib/python2.7/lib-old',
 '/home/python/.virtualenvs/h1/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/home/python/.virtualenvs/h1/local/lib/python2.7/site-packages',
 '/home/python/.virtualenvs/h1/lib/python2.7/site-packages']
Server time: 星期日, 1 四月 2018 14:49:22 +0800

猜你喜欢

转载自blog.csdn.net/chenhua1125/article/details/80034119