如何进入 pdb 来诊断生产服务器上的此错误?编程错误(1110,“列‘大约’指定了两次”

发布于 2024-08-19 17:08:34 字数 1017 浏览 1 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等你爱我 2024-08-26 17:08:34

如果您询问如何闯入 pdb,请在您想要放入调试器的代码中添加以下行:

import pdb; pdb.set_trace() 

如果您需要知道如何在生产服务器上拥有标准输出,我不知道。

If you're asking how to break into pdb, add this line in your code where you want to drop into the debugger:

import pdb; pdb.set_trace() 

If you need to know how to have a stdout on your production server, I don't know that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文