473,395 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 5327
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

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

Similar topics

8
by: Bill Eldridge | last post by:
I'm trying to grab a document off the Web and toss it into a MySQL database, but I keep running into the various encoding problems with Unicode (that aren't a problem for me with GB2312, BIG 5,...
8
by: Francis Girard | last post by:
Hi, For the first time in my programmer life, I have to take care of character encoding. I have a question about the BOM marks. If I understand well, into the UTF-8 unicode binary...
1
by: Unknown | last post by:
PROBLEM: for some reason, the variables won't work outside the function. I tried fix it by converting the variables to str and unicode and still no joy. The only way it works is by typing each...
5
by: Kurt Van Campenhout | last post by:
Hi, I am trying to get/set Terminal server information in the active directory on a windows 2000 domain. Since the ADSI calls for TS don't work until W2K3, I need to do it myself. I'm fairly...
2
by: DazedAndConfused | last post by:
I converted a C# example of using dll crypt32 to VB .NET. The converted example fails when Encypting/Decypting. I found that if instead of defining a variable as and setting the values for...
0
by: ruju00 | last post by:
I am getting an error in Login() method of the following class FtpConnection public class FtpConnection { public class FtpException : Exception { public FtpException(string message) :...
5
by: Jon Bowlas | last post by:
Hi listers, I wrote this script in Zope some time ago and it worked for a while, but now I'm getting the following error: TypeError: coercing to Unicode: need string or buffer, NoneType found ...
0
by: Buddy Home | last post by:
Hello, I'm trying to upload a file programatically and occasionally I get the following error message. Unable to write data to the transport connection: An established connection was aborted...
1
by: alivip | last post by:
I integrat program to be GUI using Tkinter I try browser direction as you can see # a look at the Tkinter Text widget # use ctrl+c to copy, ctrl+x to cut selected text, # ctrl+v to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.