Rob Miller wrote:
> Maurits van Rees wrote:
>> I have a package Products.feedfeeder here:
>> https://svn.plone.org/svn/collective/feedfeeder/trunk
>>
>> I just added a bootstrap.py and buildout.cfg there to see if that is
>> handy; so right next to the setup.py. It is a standard plone 3
>> buildout, with these changes:
>>
>> ========================
>> eggs =
>> elementtree
>> Products.feedfeeder
>>
>> # Products.feedfeeder is developed in the current directory:
>> develop = .
>> ========================
>>
>> A "bin/instance fg" works fine. A "bin/instance debug" on the other
>> hand gives an error:
>>
>> ========================================================================
>> 2008-08-05 00:01:32 ERROR Application Couldn't install Five
>> Traceback (most recent call last):
>> File
>> "/home/maurits/svn/feedfeeder/parts/zope2/lib/python/OFS/Application.py",
>> line 786, in install_product
>> initmethod(context)
>> File
>>
>> "/home/maurits/svn/feedfeeder/parts/zope2/lib/python/Products/Five/__init__.py",
>> line 28, in initialize
>> zcml.load_site()
>> File
>>
>> "/home/maurits/svn/feedfeeder/parts/zope2/lib/python/Products/Five/zcml.py",
>> line 53, in load_site
>> _context = xmlconfig.file(file)
>> File
>>
>> "/home/maurits/svn/feedfeeder/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
>> line 579, in file
>> include(context, name, package)
>> File
>>
>> "/home/maurits/svn/feedfeeder/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
>> line 515, in include
>> processxmlfile(f, context)
>> File
>>
>> "/home/maurits/svn/feedfeeder/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
>> line 370, in processxmlfile
>> parser.parse(src)
>> File "/usr/lib/python2.4/xml/sax/expatreader.py", line 107, in parse
>> xmlreader.IncrementalParser.parse(self, source)
>> File "/usr/lib/python2.4/xml/sax/xmlreader.py", line 123, in parse
>> self.feed(buffer)
>> File "/usr/lib/python2.4/xml/sax/expatreader.py", line 207, in feed
>> self._parser.Parse(data, isFinal)
>> File "/usr/lib/python2.4/xml/sax/expatreader.py", line 348, in
>> end_element_ns
>> self._cont_handler.endElementNS(pair, None)
>> File
>>
>> "/home/maurits/svn/feedfeeder/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
>> line 349, in endElementNS
>> self.context.end()
>> File
>>
>> "/home/maurits/svn/feedfeeder/parts/zope2/lib/python/zope/configuration/config.py",
>> line 544, in end
>> self.stack.pop().finish()
>> File
>>
>> "/home/maurits/svn/feedfeeder/parts/zope2/lib/python/zope/configuration/config.py",
>> line 692, in finish
>> actions = self.handler(context, **args)
>> File
>>
>> "/home/maurits/svn/feedfeeder/parts/zope2/lib/python/Products/Five/fiveconfigure.py",
>> line 78, in loadProducts
>> handleBrokenProduct(product)
>> File
>>
>> "/home/maurits/svn/feedfeeder/parts/zope2/lib/python/Products/Five/fiveconfigure.py",
>> line 76, in loadProducts
>> xmlconfig.include(_context, zcml, package=product)
>> File
>>
>> "/home/maurits/svn/feedfeeder/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
>> line 508, in include
>> f = openInOrPlain(path)
>> File
>>
>> "/home/maurits/svn/feedfeeder/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
>> line 419, in openInOrPlain
>> fp = open(filename)
>> ZopeXMLConfigurationError: File
>> "/home/maurits/svn/feedfeeder/parts/instance/etc/site.zcml", line
>> 15.2-15.23
>> IOError: [Errno 2] No such file or directory:
>>
>> '/home/maurits/svn/feedfeeder/Products/feedfeeder/Products/feedfeeder/configure.zcml'
>> ========================================================================
>>
>> The double mention of 'Products/feedfeeder' in the path of that last
>> line is strange of course.
>>
>> Why would a bin/instance fg work and a bin/instance debug fail?
>
> my guess is that the way that the paths are constructed vary between the
> two, and there's a bug in the 'debug' implementation.
>
> i've seen something different but eerily similar in another situation. i
> commonly have zope instances running in a directory named "zope" inside a
> virtualenv. if i run './zope/bin/zopectl test -sProducts.SomeProduct'
> then it doesn't work, i see error messages with duplicated paths, similar
> to what
> you've seen. it works, however, if i 'cd zope' first, and simply call
> './bin/zopectl tests -sProducts.SomeProduct'
>
> i just tried it with your buildout, and sure enough it works if i cd into
> the bin directory and run './instance debug'.
I otoh have never had "debug" work from buildout. Since my first buildout,
I get (and it doesn't matter if it runs from the directory with the
buildout.cfg or from bin):
[EMAIL PROTECTED]:~/plone/nagisa$ bin/instance2 debug
Starting debugger (the name "app" is bound to the top-level Zope object)
Traceback (most recent call last):
File "<string>", line 1, in ?
File "/home/derek/plone/nagisa/parts/zope2/lib/python/Zope2/__init__.py",
line 51, in app
startup()
File "/home/derek/plone/nagisa/parts/zope2/lib/python/Zope2/__init__.py",
line 46, in startup
from Zope2.App.startup import startup as _startup
File "/home/derek/plone/nagisa/parts/zope2/lib/python/Zope2/App/startup.py",
line 32, in ?
import OFS.Application
File "/home/derek/plone/nagisa/parts/zope2/lib/python/OFS/Application.py",
line 30, in ?
from App.ApplicationManager import ApplicationManager
File
"/home/derek/plone/nagisa/parts/zope2/lib/python/App/ApplicationManager.py",
line 92, in ?
class DatabaseChooser (SimpleItem.SimpleItem):
File
"/home/derek/plone/nagisa/parts/zope2/lib/python/App/ApplicationManager.py",
line 104, in DatabaseChooser
manage_main = PageTemplateFile('www/chooseDatabase.pt', globals())
File
"/home/derek/plone/nagisa/parts/zope2/lib/python/Products/PageTemplates/PageTemplateFile.py",
line 90, in __init__
self.pt_edit( content, guess_type(filename, content))
File
"/home/derek/plone/nagisa/parts/zope2/lib/python/zope/pagetemplate/pagetemplate.py",
line 83, in pt_edit
self.write(text)
File
"/home/derek/plone/nagisa/parts/zope2/lib/python/zope/pagetemplate/pagetemplate.py",
line 151, in write
self._cook()
File
"/home/derek/plone/nagisa/parts/zope2/lib/python/zope/pagetemplate/pagetemplate.py",
line 202, in _cook
self._v_warnings = parser.getWarnings()
AttributeError: HTMLTALParser instance has no attribute 'getWarnings'
>>>
--
derek
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers