471,330 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

Error: coercing to Unicode: need string or buffer, long found

hi

currently i am facing this error and my code is in the following:
Expand|Select|Wrap|Line Numbers
  1. def upsaved(request):
  2.     u =request.session['id']
  3.     #print u
  4.     if u:
  5.         allObj = Booking1.objects.filter(user= u)
  6.         print allObj
  7.  
  8.     return render_to_response('update_saved.html',{'allObj': allObj})    
  9.  
i am not sure where is wrong about this error and i have googled about this error type but i still not really understand what they are talking about. can anyone help me. Booking1 is my car booking table, basically it stores all the car booking information. thanks in advance for any kind help :)
Dec 20 '07 #1
1 5198
bvdet
2,851 Expert Mod 2GB
hi

currently i am facing this error and my code is in the following:
Expand|Select|Wrap|Line Numbers
  1. def upsaved(request):
  2.     u =request.session['id']
  3.     #print u
  4.     if u:
  5.         allObj = Booking1.objects.filter(user= u)
  6.         print allObj
  7.  
  8.     return render_to_response('update_saved.html',{'allObj': allObj})    
  9.  
i am not sure where is wrong about this error and i have googled about this error type but i still not really understand what they are talking about. can anyone help me. Booking1 is my car booking table, basically it stores all the car booking information. thanks in advance for any kind help :)
I would guess that request.session['id'] returns a long integer, and Booking1.objects.filter(user= u) requires u to be a string.
Dec 20 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Bill Eldridge | last post: by
8 posts views Thread by Francis Girard | last post: by
1 post views Thread by Unknown | last post: by
2 posts views Thread by DazedAndConfused | last post: by
reply views Thread by Buddy Home | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.