Hi all, I'm a relative newbie in Zope, but I have Zope 2.3.3, and now I'd like to manipulate data from an sql query in a python script. I read http://www.zope.org/Members/spinwing/ZSQL_Results , but as soon as I start asking for container.<query>().dictionaries() I get an attribute error. So I had a look at the code, it's there. attributes, names, tuples, everything. Only I can't access half of them. Help Help. Any pointers? -Erik PS what I *really* want to do is similar to this: list 1 contains types of lists list 2 contains people on those lists query: select list1.id, if(list2.list1_id=list1.id,'checked','') where list2.person_id = xxxx this shoud ideally give me a table with 1 checked 2 checked 3 4 checked or something like that. Only SQL doesnt; work like that, so I actually need to do: select list1_id from list2 where person_id=xxxx (gives me a list of ids) select list1.id, if(list1.id in <the list of ids>,'checked','') where list2.person_id = xxxx Now how to make the list, which simply needs to look like "1,2,4"
Erik Stokhof writes:
I'm a relative newbie in Zope, but I have Zope 2.3.3, and now I'd like to manipulate data from an sql query in a python script. I read http://www.zope.org/Members/spinwing/ZSQL_Results , but as soon as I start asking for container.<query>().dictionaries() I get an attribute error. We (and in fact you) need to know which attribute is not found and where is the problem detected (traceback).
Whenever you analyse (or report) a problem, you always look (and report) at the "Error type/Error value" information at the top of your error page and at the last lines of the traceback (near the bottom of your page). This part of the traceback tells you where the error has been detected. You go up until you find an name defined by your code. That's where you can intervene... In your concrete case: What the missing attribute "dictionaries"? Some database adapters do not define it (e.g. ZODBCDA) (this is a bug). Is the missing attribute something different? Dieter
participants (2)
-
Dieter Maurer -
Erik Stokhof