[ZCM] [ZC] 1916/ 8 Comment "ZConfig/products directive and @import
has bootstrap issue"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Mon Apr 24 14:24:37 EDT 2006
Issue #1916 Update (Comment) "ZConfig/products directive and @import has bootstrap issue"
Status Rejected, Zope/bug medium
To followup, visit:
http://www.zope.org/Collectors/Zope/1916
==============================================================
= Comment - Entry #8 by eikenberry on Apr 24, 2006 2:24 pm
> = Comment - Entry #7 by chrisw on Mar 23, 2006 3:27 am
>
> John, APE's been deprecated by Shane, is this still an issue for you?
Arrrggg! First I've heard of this... check'd shane's blog and see he decided this back in feb. :P
I guess that makes it less of a big deal to me particularly. Though it still seems like it could be a bug. Given that adding to the PYTHONPATH didn't seem to work.
________________________________________
= Comment - Entry #7 by chrisw on Mar 23, 2006 3:27 am
Alan, don't be so rude, it's not going to help this issue get resolved, if there is actually an issue.
John, APE's been deprecated by Shane, is this still an issue for you?
FWIW, I'm pretty sure MailingLogger works in exactly the same way as the two other product mentioned here in that you need to insert the following in zope.conf:
%import Products.MailingLogger
That works fine for me on a stock install on both Linux on Zope 2.8.5 and Windows on Zope 2.9.1.
Until someone can actually show me a real issue here, I say that something else is causing the problems the people on this issue have reported.
________________________________________
= Comment - Entry #6 by runyaga on Mar 3, 2006 2:18 pm
reopen this bug. chrisw dont be so dismissive. it does not help the platform.
________________________________________
= Comment - Entry #5 by eikenberry on Mar 3, 2006 2:16 pm
As a test, I changed the import statement in question in APE's componenets.xml file. So I was able to get further in the startup process, but it still blew up later with a "Error: could not load package Ape: No module named Ape" error. Checking sys.path at this point I notice all the PYTHONPATH paths have been stripped from the sys.path.
So unless I'm missing something, setting PYTHONPATH will not work.
I suggest reopening the bug.
________________________________________
= Comment - Entry #4 by eikenberry on Mar 3, 2006 12:55 am
That won't work. The product in question (APE) uses Products.Ape internally. So it needs to be imported the same way and you can't have 2 paths in PYTHONPATH with the same module names (ie. Products). It only tries the first one it encounters. So if I make the line in the zope.conf %import Products.Ape and have my path as the first in PYTHONPATH, then it fails to find standard zope products (eg. it errors out on importing ZServer). If I make mine second, it can't find it.
________________________________________
= Reject - Entry #3 by chrisw on Feb 15, 2006 5:41 am
Status: Pending => Rejected
There isn't a problem here, you just need to make sure that whatever you try to %import is on your python path before you try and import it.
export PYTHON_PATH=$PYTHON_PATH$;C:\tmp\Products
...will probably do it.
________________________________________
= Comment - Entry #2 by eikenberry on Feb 10, 2006 11:10 pm
Confirmed that this is still an issue in Zope-2.8.4 and I don't see it in the Zope-2.9 release notes. This has become an issue for us as well as we keep our products outside of the instance home and we use APE (which uses %import).
________________________________________
= Request - Entry #1 by Anonymous User on Oct 12, 2005 5:03 pm
create a folder called C:\tmp\Products
in the zope.conf for the products directive
point to C:\tmp\Products
put ClockServer or something that has component.xml and friends in a
folder in C:\tmp\Products
try to to %import Products.ClockServer
you will get a import error.
I imagine because hte Products path/module isnt munged when
ZConfig reads the %import
not a huge problem - but certainly painful for Zope 2 series on Windows.
==============================================================
More information about the Zope-Collector-Monitor
mailing list