[albatross-users] Python 2.4.1 incompatibility with al-for ?

Andrew McNamara andrewm at object-craft.com.au
Tue Apr 19 20:25:25 EST 2005


>Maybe the mysql library was upgraded when you went
>from 2.2 to 2.4? My guess would be that it's returning an iterable,
>rather than an array. Currently <al-for> requires an indexable object
>such as an array or tuple. I guess you could try something like:

It might also be worth trying to cast the object returned by mysql to a
list explicitly:

    if result:
        ctx.locals._loglist = list(c.fetchone()['changelog'])

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/



More information about the Albatross-users mailing list