如何进入 pdb 来诊断生产服务器上的此错误?编程错误(1110,“列‘大约’指定了两次”
ProgrammingError(1110, "Column 'about' specified twice"
/usr/local/lib/python2.5/site-packages/MySQLdb/connections.py
errorclass
<class '_mysql_exceptions.ProgrammingError'>
errorvalue
ProgrammingError(1110, "Column 'about' specified twice")
此错误似乎发生在 django_authopenid/views.py 中:
if 'bnewaccount' in request.POST.keys():
form1 = OpenidRegisterForm(request.POST)
if form1.is_valid():
next = clean_next(form1.cleaned_data.get('next'))
is_redirect = True
tmp_pwd = User.objects.make_random_password()
user_ = User.objects.create_user(form1.cleaned_data['username'],
form1.cleaned_data['email'], tmp_pwd) ### this is the last evaluated line in my code
# make association with openid
uassoc = UserAssociation(openid_url=str(openid_),
user_id=user_.id)
uassoc.save()
ProgrammingError(1110, "Column 'about' specified twice"
/usr/local/lib/python2.5/site-packages/MySQLdb/connections.py
errorclass
<class '_mysql_exceptions.ProgrammingError'>
errorvalue
ProgrammingError(1110, "Column 'about' specified twice")
This error seems to be happening here in django_authopenid/views.py:
if 'bnewaccount' in request.POST.keys():
form1 = OpenidRegisterForm(request.POST)
if form1.is_valid():
next = clean_next(form1.cleaned_data.get('next'))
is_redirect = True
tmp_pwd = User.objects.make_random_password()
user_ = User.objects.create_user(form1.cleaned_data['username'],
form1.cleaned_data['email'], tmp_pwd) ### this is the last evaluated line in my code
# make association with openid
uassoc = UserAssociation(openid_url=str(openid_),
user_id=user_.id)
uassoc.save()
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您询问如何闯入 pdb,请在您想要放入调试器的代码中添加以下行:
如果您需要知道如何在生产服务器上拥有标准输出,我不知道。
If you're asking how to break into pdb, add this line in your code where you want to drop into the debugger:
If you need to know how to have a stdout on your production server, I don't know that.