Giovanni Toffoli schrieb:
Hi all,
in developing a product above collective.lead and collective.tin, I get
a TypeError such as:
TypeError: ('Could not adapt', <PersonTitleFolder at
/fulbright_db/fulbright/persontitlefolder.2008-08-16.9942504507>,
('Could not adapt', <PersonTitleFolder at
/fulbright_db/fulbright/persontitlefolder.2008-08-16.9942504507>,
<InterfaceClass collective.tin.interfaces.ISession>)
The configure.zclm file of collective.tin includes the following directive:
<adapter
factory="sqlalchemy.orm.session.object_session"
provides=".interfaces.ISession"
for="*"
/>
On the other hand, using zopepy I can execute
from sqlalchemy.orm.session import object_session
I would like to investigate a little
- if and why the configure.zclm file of collective.tin hasn't been loaded
If you use buildout then you have to add collective.tin to the [zcml] of
your buildout.cfg
And the suffix of configure should be zcml not zclm.
- if and why some directives inside it aren't effective in my case.
Thus I have 2 questions
1.
Is there a way of tracing (getting a log of) the loading of all the
configure.zcml files, starting from site.zcml ?
I´m intrested in this as well.
Btw. you can make a typo in your configure. Then you will get an error
on startup.
2.
How can I access the adapter registry where the adapters defined in the
<adapter> directives are registered?
In the documentation of the package zope.interface I find how to create
and lookup directly (by interface) an adapter register, but I don't know
which adapter register is used by my Zope/Plone site.
You can try with queryadapter from zope.component package.
Obviously I would also appreciate suggestions for other approaches of
investigating the problem.
Thank you very much in advance, Giovanni Toffoli
HTH Christian
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers