[albatross-users] Python 2.4.1 incompatibility with al-for ?
Sheila King
sheila at thinkspot.net
Tue Apr 19 17:00:15 EST 2005
Hello,
I was wondering if anyone has any experience with this situation...
We have an albatross application that we have been running with the latest
albatross on Python 2.2.2 since December 2004 without event (other than our
own bugs)
We were preparing to upgrade to Python 2.4.1 and are testing our
development copy of the code against 2.4.
Most all of it appears to work fine.
However, there is one page where I keep getting an "Internal Server Error"
and have seen that the file is producing no output for the CGI script (we
are running albatross as CGI).
I finally tracked it down to the HTML template that accompanies that page.
The .py page module is fine. However, the HTML template has something in it
that is causing the error.
In order to try and determine what lines of the HTML file may be causing
the problem (because the log files produced no useful error messages), I
was going through and adding one line at a time to the HTML file and
running it after each addition.
I get the error when I add this line to the file:
<al-for iter="entry" expr="_loglist" pagesize="50" prepare />
the _loglist variable is defined as the result of a MySQL query
c = QA.cursor()
result = c.execute("""SELECT changelog
FROM qadb
WHERE CID=%s;""" % ctx.locals._account_num)
if result:
ctx.locals._loglist = c.fetchone()['changelog']
Note that c is a dictionary class cursor from MySQLdb and so it returns a
tuple of dictionary mappings. In this case there is only one key in the
dictionary. I don't think that is relevant to this issue, though...
It seems that there is some incompatibility with the <al-for prepare />
statement shown above and Python 2.4.1
If anyone has any ideas what could be causing this...well, I hope you'll
let me know.
Regards,
Sheila
More information about the Albatross-users
mailing list