当我删除图片并尝试保存配置文件时,它会向我显示错误“incorect padding”
我的代码是
的 Models.py
import webcam.admin
from webcam import widgets
from webcam.fields import CameraField
picture=CameraField('Webcam_Image', format='jpeg', null=True, blank=True, upload_to='pictures')
admin.py
from webcam import widgets
from webcam.fields import CameraField
FORMFIELD_FOR_DBFIELD_DEFAULTS[CameraField] = {'widget': widgets.CameraWidget}
错误
Incorrect padding
Request Method: POST
Request URL: http://127.0.0.1:8000/admin/account/account/8/
Django Version: 1.8.4
Exception Type: Error
Exception Value:
Incorrect padding
Exception Location: /usr/lib/python2.7/base64.py in decodestring, line 321
Python Executable: /home/cpverma/work/school/env/bin/python
Python Version: 2.7.6
Python Path:
['/home/cpverma/work/cpverma/crushernew',
'/home/cpverma/work/school/env/lib/python2.7',
'/home/cpverma/work/school/env/lib/python2.7/plat-x86_64-linux-gnu',
'/home/cpverma/work/school/env/lib/python2.7/lib-tk',
'/home/cpverma/work/school/env/lib/python2.7/lib-old',
'/home/cpverma/work/school/env/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/cpverma/work/school/env/local/lib/python2.7/site-packages']
Server time: Wed, 28 Oct 2015 22:06:04 +0000