473,372 Members | 1,157 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,372 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 5326
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.