[Zope] Select Count problem

Dieter Maurer dieter@handshake.de
Thu, 25 Jul 2002 20:54:47 +0200


Jose Gerardo Amaya Giron writes:
 > In a SQL Method I'm executing a select count query this way
 > 
 > select count(*) as count from table where attrib=something
 > 
 > now I want to get the results in a python script I try to get it with no
 > success with the following 
 > 
 > SQLdata_datos_count = container.dic_datos_count(pdf_id=1)
 > 
 > SQLdata_datos_count[0].count
This looks correct!

 > but I get a
 > 
 > Error Type: TypeError
 > Error Value: argument 2 to map() must be a sequence object
Are you sure, the error is in the above line? I doubt it very much.
There is not "map" around in the code, you show us.

Python and Zope also provide tracebacks. These are *very* valuable
information to localize errors. Whenever you report a problem
involving an exception, you should provide both "Error Type"
and "Error Value" (as you do above) and also at least
the last lines of the traceback (if it is not too long, the complete one).
It tells you (and us) where precisely the error was detected.


Dieter