[Grok-dev] ./bin/paster serve blobfile error

DIVINE, PAUL (PAUL) paul.divine at alcatel-lucent.com
Wed Feb 23 08:29:29 EST 2011


/root/.buildout/eggs/z3c.blobfile-0.1.0-y2.5.egg/z3c/blobfile/overrides.zcml

# cat /root/.buildout/eggs/z3c.blobfile-0.1.0-py2.5.egg/z3c/blobfile/overrides.zcml

<configure xmlns="http://namespaces.zope.org/zope"
           xmlns:browser="http://namespaces.zope.org/browser">

  <!-- Provide local overrides of standard configurations -->

    <!-- content classes -->

  <class class=".file.File">

    <factory
        id="zope.app.content.File"
        title="File"
        description="A File"
        />

  </class>

  <class class=".image.Image">

    <factory
        id="zope.app.content.Image"
        title="Image"
        description="An Image"
        />

  </class>

  <!-- include browser package 
  <include package="z3c.blobfile.browser" />

  -->
</configure>

The paster command gives the following results

(virtual_env_05)pl6320:/home/npo/virtual_env_05/npotools# ./bin/paster serve parts/etc/debug.ini
2011-02-23 08:07:16,447 WARNING [root] Developer mode is enabled: this is a security risk and should NOT be enabled on production s
ervers. Developer mode can usually be turned off by setting the `devmode` option to `off` or by removing it from the instance confi
guration file completely.
Traceback (most recent call last):
  File "./bin/paster", line 140, in <module>
    paste.script.command.run()
  File "/root/.buildout/eggs/PasteScript-1.7.3-py2.5.egg/paste/script/command.py", line 84, in run
    invoke(command, command_name, options, args[1:])
  File "/root/.buildout/eggs/PasteScript-1.7.3-py2.5.egg/paste/script/command.py", line 123, in invoke
    exit_code = runner.run(args)
  File "/root/.buildout/eggs/PasteScript-1.7.3-py2.5.egg/paste/script/command.py", line 218, in run
    result = self.command()
  File "/root/.buildout/eggs/PasteScript-1.7.3-py2.5.egg/paste/script/serve.py", line 276, in command
    relative_to=base, global_conf=vars)
  File "/root/.buildout/eggs/PasteScript-1.7.3-py2.5.egg/paste/script/serve.py", line 313, in loadapp
    **kw)
  File "/home/npo/virtual_env_05/lib/python2.5/site-packages/PasteDeploy-1.3.4-py2.5.egg/paste/deploy/loadwsgi.py", line 203, in lo
adapp
    return loadobj(APP, uri, name=name, **kw)
  File "/home/npo/virtual_env_05/lib/python2.5/site-packages/PasteDeploy-1.3.4-py2.5.egg/paste/deploy/loadwsgi.py", line 224, in lo
adobj
    return context.create()
  File "/home/npo/virtual_env_05/lib/python2.5/site-packages/PasteDeploy-1.3.4-py2.5.egg/paste/deploy/loadwsgi.py", line 617, in cr
eate
    return self.object_type.invoke(self)
  File "/home/npo/virtual_env_05/lib/python2.5/site-packages/PasteDeploy-1.3.4-py2.5.egg/paste/deploy/loadwsgi.py", line 163, in in
voke
    app = context.app_context.create()
  File "/home/npo/virtual_env_05/lib/python2.5/site-packages/PasteDeploy-1.3.4-py2.5.egg/paste/deploy/loadwsgi.py", line 617, in cr
eate
    return self.object_type.invoke(self)
  File "/home/npo/virtual_env_05/lib/python2.5/site-packages/PasteDeploy-1.3.4-py2.5.egg/paste/deploy/loadwsgi.py", line 109, in in
voke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/home/npo/virtual_env_05/lib/python2.5/site-packages/PasteDeploy-1.3.4-py2.5.egg/paste/deploy/util/fixtypeerror.py", line 5
7, in fix_call
    val = callable(*args, **kw)
  File "/root/.buildout/eggs/grokcore.startup-1.1-py2.5.egg/grokcore/startup/startup.py", line 19, in debug_application_factory
    app = application_factory(global_conf, **local_conf)
  File "/root/.buildout/eggs/grokcore.startup-1.1-py2.5.egg/grokcore/startup/startup.py", line 14, in application_factory
    return zope.app.wsgi.getWSGIApplication(zope_conf)
  File "/root/.buildout/eggs/zope.app.wsgi-3.10.0-py2.5.egg/zope/app/wsgi/__init__.py", line 162, in getWSGIApplication
    db = config(configfile, schemafile, features)
  File "/root/.buildout/eggs/zope.app.wsgi-3.10.0-py2.5.egg/zope/app/wsgi/__init__.py", line 150, in config
    appsetup.config(options.site_definition, features=features)
  File "/root/.buildout/eggs/zope.app.appsetup-3.15.0-py2.5.egg/zope/app/appsetup/appsetup.py", line 111, in config
    context = xmlconfig.file(file, context=context, execute=execute)
  File "/root/.buildout/eggs/zope.configuration-3.7.2-py2.5.egg/zope/configuration/xmlconfig.py", line 653, in file
    context.execute_actions()
  File "/root/.buildout/eggs/zope.configuration-3.7.2-py2.5.egg/zope/configuration/config.py", line 606, in execute_actions
    callable(*args, **kw)
  File "/root/.buildout/eggs/grokcore.view-2.3-py2.5.egg/grokcore/view/meta/views.py", line 53, in check_templates
    module_info, factory, component_name, self.has_render, self.has_no_render)
  File "/root/.buildout/eggs/grokcore.view-2.3-py2.5.egg/grokcore/view/templatereg.py", line 254, in checkTemplates
    (component_name.title(), factory), factory)
zope.configuration.config.ConfigurationExecutionError: <class 'martian.error.GrokError'>: View <class 'npotools.app_old.Index'> has
 no associated template or 'render' method.
  in:
  File "/home/npo/virtual_env_05/npotools/src/npotools/configure.zcml", line 5.2-5.27
    <grok:grok package="." />

(virtual_env_05)pl6320:/home/npo/virtual_env_05/npotools#

Regards,
Paul
-----Message d'origine-----
De : grok-dev-bounces at zope.org [mailto:grok-dev-bounces at zope.org] De la part de Jan-Wijbrand Kolman
Envoyé : mercredi 23 février 2011 13:57
À : grok-dev at zope.org
Objet : Re: [Grok-dev] ./bin/paster serve blobfile error

On 2/23/11 13:27 PM, DIVINE, PAUL (PAUL) wrote:
> Thanks for the reply.
>
> I use BlobFile like the following lines
snip

I think this means you do not use the views that are defined in 
z3c.blobfile.browser.

It is unfortunate that the overrides.zcml in z3c.blobfile references the 
configure.zcml in z3c.blobfile.browser that implicitly relies on 
whatever package that brings the <browser:form..> directive.

Could you try to remove the line that says..:

   <include package=".browser" />

..from the overrides.zcml in your z3c.blobfile egg and see if that 
brings you somewhat further..?

regards, jw

_______________________________________________
Grok-dev mailing list
Grok-dev at zope.org
https://mail.zope.org/mailman/listinfo/grok-dev


More information about the Grok-dev mailing list