[Zope-DB] InterfaceError with DCOracle adapter
Matthew T. Kromer
matt@zope.com
Fri, 30 May 2003 09:55:20 -0400
Sidnei da Silva wrote:
>Howdy,
>
>Any clue about what could cause the following error?
>
>Error Type: InterfaceError
>Error Value: cursor is closed
>
>The error happens intermitently, which smells like it may be a
>networking problem, but I havent looked at the code, so I may be
>guessing wrong.
>
>Heres the meaningful part of the traceback:
>
> Module Script (Python), line 11, in trocaSenha
> - <PythonScript at /ucs/paraoaluno/servicos/novos/trocaSenha>
> - Line 11
> Module Shared.DC.ZRDB.DA, line 428, in __call__
> Module Products.ZOracleDA.db, line 175, in query
> Module Products.ZOracleDA.DCOracle2.DCOracle2, line 945, in execute
>InterfaceError: cursor is closed
>
>[]'s
>
>
Yes, it sounds like something closed the cursor (due to it timing out,
or whatever) and it needs to reopen a new cursor.
The InterfaceError being raised on operations on a closed cursor are
fairly new with respect to the DA; I doubt the DA ever contemplates
getting an interface error (if that is really even the "right" error to
raise; it was something of an arbitrary decision on my part to raise an
InterfaceError rather than a ProgrammingError).
I'll make a note to look at that code in the DA and see if it is now
missing a case where it should automatically close and reopen the cursor.
--
Matt Kromer
Zope Corporation http://www.zope.com/