[Zope] external method strangeness

Dieter Maurer dieter at handshake.de
Thu Oct 19 15:37:42 EDT 2006


garry saddington wrote at 2006-10-18 18:13 +0100:
> ...
>import psycopg, string, re, subprocess
>def scholarpack_xml_transform(source):
>    f=open('/opt/scholarpack/ancillary/source.xml','w')
>    f.write(source) 
>    f.close

The line above looks buggy: missing "()".
> ...
>    do=curs.execute(transformed1)
>    do

The line above looks doubtfull: no effect

>    conn.commit()
>    conn.close
>    
>I get a programming error thrown from the conn.commit() line and the
>method fails.


Almost surely, "postgres" does not like the command your have generated.

   It is quite picky with binary data...



-- 
Dieter


More information about the Zope mailing list