[Z3-sqlos] TypeError: "Could not adapt" when creating SQL-connection

Fabio Tranchitella kobold at kobold.it
Thu Aug 31 10:52:43 CEST 2006


Il giorno gio, 31/08/2006 alle 09.29 +0200, Florian Reiser ha scritto:
> Hello,
> 
> I've created an SQL-Folder using SQLObjectContainer.
> When adding the object to Zope3.2.1, I get an TypeError stating:
> "Could not adapt". With pdb I found out that the error occurs in
> sqlos/connection.py line 78 stating: "conn = IZopeSQLConnection(zda())".

What database adapter are you using? At the moment, you need to specify
it in an explicit way. See the sqlos's configure.zcml:

  <!--
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    For now, you need to change the factory here if you want
    to use a diferent connection type.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  -->

  <adapter
      provides=".interfaces.IZopeSQLConnection"
      for="zope.app.rdb.interfaces.IZopeConnection"
      permission="zope.Public"
      factory=".adapter.PostgresAdapter"
      />

Cheers,

-- 
Fabio Tranchitella                         http://www.kobold.it
Free Software Developer and Consultant     http://www.tranchitella.it
_____________________________________________________________________
1024D/7F961564, fpr 5465 6E69 E559 6466 BF3D 9F01 2BF8 EE2B 7F96 1564
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Questa =?ISO-8859-1?Q?=E8?= una parte del messaggio
	firmata digitalmente
Url : http://codespeak.net/pipermail/z3-sqlos/attachments/20060831/2087b4eb/attachment.pgp 


More information about the z3-sqlos mailing list