Hi Darryl,

I've made changes to the trunk:

   http://svn.repoze.org/repoze.bfg/trunk/CHANGES.txt

And to the 1.1 branch:

   http://svn.repoze.org/repoze.bfg/branches/1.1/CHANGES.txt

That hopefully will solve this issues.

Thanks again!

- C



Darryl Cousins wrote:
> Hi Chris
> 
> On Thu, Dec 3, 2009 at 8:11 PM, Chris McDonough <chr...@plope.com> wrote:
>> Darryl Cousins wrote:
>>> Hi All,
>>>
>>> I found that the recipe [1] to run repoze.bfg on gae **almost** works.
>> Thanks for the analysis!
>>
>> I think the best solution would be to make all imports of Chameleon
>> conditional.    This actually *used* to be the case; something must have
>> broken it since 1.0 (the last time I tested that tutorial).
>>
>> Can you provide the traceback that is emitted when "the wrong thing"
>> happens?
> 
> Yes. App starts ok, on first request the following traceback:
> 
> Mac OS X 10.5.8 - using python2.5 mac ports
> 
> Hope that helps, best,
> Darryl
> 
> darrylcous...@lyrrad:~/projects/placerama $ dev_appserver.py app
> INFO     2009-12-03 07:53:00,113 appengine_rpc.py:157] Server:
> appengine.google.com
> WARNING  2009-12-03 07:53:00,118 datastore_file_stub.py:443] Could not
> read datastore data from
> /var/folders/I+/I+TKAJhUHkGqvthbu07a-U+++TI/-Tmp-/dev_appserver.datastore
> INFO     2009-12-03 07:53:00,162 dev_appserver_main.py:478] Running
> application placerama on port 8080: http://localhost:8080
> WARNING  2009-12-03 07:53:06,429 py_zipimport.py:103] Can't open
> zipfile 
> /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg:
> IOError: [Errno 13] file not accessible:
> '/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg'
> ERROR    2009-12-03 07:53:07,652 dev_appserver.py:3009] Exception
> encountered handling request
> Traceback (most recent call last):
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 2978, in _HandleRequest
>    base_env_dict=env_dict)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 411, in Dispatch
>    base_env_dict=base_env_dict)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 2244, in Dispatch
>    self._module_dict)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 2162, in ExecuteCGI
>    reset_modules = exec_script(handler_path, cgi_path, hook)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 2058, in ExecuteOrImportScript
>    exec module_code in script_module.__dict__
>  File "/Users/darrylcousins/projects/placerama/app/runner.py", line
> 56, in <module>
>    application = application(*(config_args or ()), **(config_kwargs or {}))
>  File "/Users/darrylcousins/projects/placerama/app/placerama/run.py",
> line 10, in app
>    return make_app(get_root, placerama, options=kw)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/repoze.bfg-1.1.3-py2.5.egg/repoze/bfg/router.py",
> line 183, in make_app
>    settings)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/repoze.bfg-1.1.3-py2.5.egg/repoze/bfg/configuration.py",
> line 107, in make_registry
>    zcml_configure(filename, package)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/repoze.bfg-1.1.3-py2.5.egg/repoze/bfg/configuration.py",
> line 147, in zcml_configure
>    xmlconfig.include(context, name, package)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/zope.configuration-3.6.0-py2.5.egg/zope/configuration/xmlconfig.py",
> line 546, in include
>    processxmlfile(f, context)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/zope.configuration-3.6.0-py2.5.egg/zope/configuration/xmlconfig.py",
> line 378, in processxmlfile
>    parser.parse(src)
>  File 
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/sax/expatreader.py",
> line 107, in parse
>    xmlreader.IncrementalParser.parse(self, source)
>  File 
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/sax/xmlreader.py",
> line 123, in parse
>    self.feed(buffer)
>  File 
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/sax/expatreader.py",
> line 207, in feed
>    self._parser.Parse(data, isFinal)
>  File 
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/sax/expatreader.py",
> line 349, in end_element_ns
>    self._cont_handler.endElementNS(pair, None)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/zope.configuration-3.6.0-py2.5.egg/zope/configuration/xmlconfig.py",
> line 357, in endElementNS
>    self.context.end()
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/zope.configuration-3.6.0-py2.5.egg/zope/configuration/config.py",
> line 537, in end
>    self.stack.pop().finish()
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/zope.configuration-3.6.0-py2.5.egg/zope/configuration/config.py",
> line 685, in finish
>    actions = self.handler(context, **args)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/zope.configuration-3.6.0-py2.5.egg/zope/configuration/xmlconfig.py",
> line 546, in include
>    processxmlfile(f, context)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/zope.configuration-3.6.0-py2.5.egg/zope/configuration/xmlconfig.py",
> line 378, in processxmlfile
>    parser.parse(src)
>  File 
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/sax/expatreader.py",
> line 107, in parse
>    xmlreader.IncrementalParser.parse(self, source)
>  File 
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/sax/xmlreader.py",
> line 123, in parse
>    self.feed(buffer)
>  File 
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/sax/expatreader.py",
> line 207, in feed
>    self._parser.Parse(data, isFinal)
>  File 
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/sax/expatreader.py",
> line 349, in end_element_ns
>    self._cont_handler.endElementNS(pair, None)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/zope.configuration-3.6.0-py2.5.egg/zope/configuration/xmlconfig.py",
> line 357, in endElementNS
>    self.context.end()
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/zope.configuration-3.6.0-py2.5.egg/zope/configuration/config.py",
> line 537, in end
>    self.stack.pop().finish()
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/zope.configuration-3.6.0-py2.5.egg/zope/configuration/config.py",
> line 684, in finish
>    args = toargs(context, *self.argdata)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/zope.configuration-3.6.0-py2.5.egg/zope/configuration/config.py",
> line 1376, in toargs
>    args[str(name)] = field.fromUnicode(s)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/zope.configuration-3.6.0-py2.5.egg/zope/configuration/fields.py",
> line 139, in fromUnicode
>    value = self.context.resolve(name)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/zope.configuration-3.6.0-py2.5.egg/zope/configuration/config.py",
> line 180, in resolve
>    mod = __import__(mname, *_import_chickens)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1163, in Decorate
>    return func(self, *args, **kwargs)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1812, in load_module
>    return self.FindAndLoadModule(submodule, fullname, search_path)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1163, in Decorate
>    return func(self, *args, **kwargs)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1714, in FindAndLoadModule
>    description)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1163, in Decorate
>    return func(self, *args, **kwargs)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1665, in LoadModuleRestricted
>    description)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/repoze.bfg-1.1.3-py2.5.egg/repoze/bfg/chameleon_zpt.py",
> line 6, in <module>
>    from chameleon.zpt.template import PageTemplateFile
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1163, in Decorate
>    return func(self, *args, **kwargs)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1812, in load_module
>    return self.FindAndLoadModule(submodule, fullname, search_path)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1163, in Decorate
>    return func(self, *args, **kwargs)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1714, in FindAndLoadModule
>    description)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1163, in Decorate
>    return func(self, *args, **kwargs)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1665, in LoadModuleRestricted
>    description)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/Chameleon-1.0-py2.5.egg/chameleon/zpt/template.py",
> line 3, in <module>
>    import language
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1163, in Decorate
>    return func(self, *args, **kwargs)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1812, in load_module
>    return self.FindAndLoadModule(submodule, fullname, search_path)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1163, in Decorate
>    return func(self, *args, **kwargs)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1714, in FindAndLoadModule
>    description)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1163, in Decorate
>    return func(self, *args, **kwargs)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1665, in LoadModuleRestricted
>    description)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/Chameleon-1.0-py2.5.egg/chameleon/zpt/language.py",
> line 9, in <module>
>    import expressions
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1163, in Decorate
>    return func(self, *args, **kwargs)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1812, in load_module
>    return self.FindAndLoadModule(submodule, fullname, search_path)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1163, in Decorate
>    return func(self, *args, **kwargs)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1714, in FindAndLoadModule
>    description)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1163, in Decorate
>    return func(self, *args, **kwargs)
>  File 
> "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py",
> line 1665, in LoadModuleRestricted
>    description)
>  File 
> "/Users/darrylcousins/projects/placerama/app/lib/python/Chameleon-1.0-py2.5.egg/chameleon/zpt/expressions.py",
> line 2, in <module>
>    import parser
> ZopeXMLConfigurationError: File
> "/Users/darrylcousins/projects/placerama/app/placerama/configure.zcml",
> line 3.2-3.42
>    ZopeXMLConfigurationError: File
> "/Users/darrylcousins/projects/placerama/app/lib/python/repoze.bfg-1.1.3-py2.5.egg/repoze/bfg/includes/configure.zcml",
> line 9.2-12.7
>    ImportError: No module named parser
> INFO     2009-12-03 07:53:07,664 dev_appserver.py:3038] "GET / HTTP/1.1" 500 -
> INFO     2009-12-03 07:53:07,670 py_zipimport.py:108]
> zipimporter('/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg',
> '')
> 
> 
>>> The failure was that the resulting fresh application loads Chameleon via:
>>>
>>> <include package="repoze.bfg.includes" />
>>>
>>> which is included in paster jinja2 template configure.zcml [2]
>>>
>>> Just removing this line gets the app up and running but is missing
>>> directives from repoze.zcml:meta.zcml
>>>
>>> I see 2 options:
>>>
>>> 1. replace the above mentioned include with the following in the
>>> jinja2 paster template (attached patch.diff)
>>>
>>> <include package="repoze.zcml" file="meta.zcml" />
>>>
>>> ... which has the drawback that those using the paster template do not
>>> have Chameleon (desirable in gae but perhaps not in other scenarios).
>>>
>>> 2. Make a mention in the tutorial (perhaps as in attached doc.diff)
>>>
>>> Hope that is helpful,
>>> Darryl Cousins
>>>
>>> [1] http://docs.repoze.org/bfg/1.2/tutorials/gae/index.html
>>> [2]
>>> http://svn.repoze.org/repoze.bfg.jinja2/trunk/repoze/bfg/jinja2/paster_template/+package+/configure.zcml
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Repoze-dev mailing list
>>> Repoze-dev@lists.repoze.org
>>> http://lists.repoze.org/listinfo/repoze-dev
>>
> _______________________________________________
> Repoze-dev mailing list
> Repoze-dev@lists.repoze.org
> http://lists.repoze.org/listinfo/repoze-dev

_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to