On Fri, 2011-10-07 at 10:56 -0700, Iain Duncan wrote:
> Hi Chris, I tried it out with Pyramid 1.2 and pyramid_zcml 0.7. I get
> a different error, and again, switching the pyramid egg back to 1.1
> makes it go away. I've posted the traceback here, and attached the two
> zcml files, the second of which is being included with
> includeOverrides
> 
> 
> 
> I double checked that swapping the pyramid egg only triggers the issue
> and that the app runs fine with the attached routes.zcml files in the
> base xornot.cms package and the overriding test package. 

I think this is actually an independent issue related to the following
(from the CHANGES.txt of Pyramid 1.2.X):

- It may be necessary to more strictly order configuration route and
  view statements when using an "autocommitting" Configurator.  In the
  past, it was possible to add a view which named a route name before
  adding a route with that name when you used an autocommitting 
  configurator.  For example::

    config = Configurator(autocommit=True)
    config.add_view('my.pkg.someview', route_name='foo')
    config.add_route('foo', '/foo')

  The above will raise an exception when the view attempts to add
  itself. Now you must add the route before adding the view::

    config = Configurator(autocommit=True)
    config.add_route('foo', '/foo')
    config.add_view('my.pkg.someview', route_name='foo')

  This won't effect "normal" users, only people who have legacy BFG 
  codebases that used an autommitting configurator and possibly tests
  that use the configurator API (the configurator returned by  
  ``pyramid.testing.setUp`` is an autocommitting configurator).  The
  right way to get around this is to use a non-autocommitting
  configurator (the default), which does  not have these directive
  ordering requirements.

Note that if you're still doing "from pyramid.configuration import
Configurator", that is a autocommitting Configurator.  Change that to
"from pyramid.config import Configurator" if so.

- C



> 
> 
> thanks
> Iain
> 
> 
> traceback:
> 
> 
> Traceback (most recent call last):
> File "bin/paster", line 53, in <module>
> paste.script.command.run()
> File
> "/home/cms_demos/Test/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/command.py",
>  line 104, in run
> invoke(command, command_name, options, args[1:])
> File
> "/home/cms_demos/Test/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/command.py",
>  line 143, in invoke
> exit_code = runner.run(args)
> File
> "/home/cms_demos/Test/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/command.py",
>  line 238, in run
> result = self.command()
> File
> "/home/cms_demos/Test/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/serve.py",
>  line 284, in command
> relative_to=base, global_conf=vars)
> File
> "/home/cms_demos/Test/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/serve.py",
>  line 321, in loadapp
> **kw)
> File
> "/home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py",
>  line 247, in loadapp
> return loadobj(APP, uri, name=name, **kw)
> File
> "/home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py",
>  line 272, in loadobj
> return context.create()
> File
> "/home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py",
>  line 710, in create
> return self.object_type.invoke(self)
> File
> "/home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py",
>  line 203, in invoke
> app = context.app_context.create()
> File
> "/home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py",
>  line 710, in create
> return self.object_type.invoke(self)
> File
> "/home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py",
>  line 146, in invoke
> return fix_call(context.object, context.global_conf,
> **context.local_conf)
> File
> "/home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/util.py", 
> line 56, in fix_call
> val = callable(*args, **kw)
> File "/home/cms_demos/Test/test/app.py", line 85, in app
> config.commit()
> File
> "/home/cms_demos/Test/eggs/pyramid-1.2.1-py2.6.egg/pyramid/config/__init__.py",
>  line 485, in commit
> self.action_state.execute_actions()
> File
> "/home/cms_demos/Test/eggs/pyramid-1.2.1-py2.6.egg/pyramid/config/__init__.py",
>  line 905, in execute_actions
> callable(*args, **kw)
> File
> "/home/cms_demos/Test/eggs/pyramid-1.2.1-py2.6.egg/pyramid/config/views.py", 
> line 928, in register
> route_name)
> pyramid.exceptions.ConfigurationExecutionError: <class
> 'pyramid.exceptions.ConfigurationError'>: No route named content found
> for view registration
> in:
> File
> "/home/xornot/framework_pyramid/src/xornot.cms/xornot/cms/routes.zcml", line 
> 43.2-51.4
> <view 
> for="xornot.dram.interfaces.IResourceContainer"
> name="" 
> view="xornot.dram.views.ListAction"
> permission="view"
> wrapper="content_wrapper"
> route_name="content"
> renderer="xornot.cms:templates/resource_list.pt"
> />
> 
> 
> 
> On Fri, Oct 7, 2011 at 7:01 AM, Chris McDonough <chr...@plope.com>
> wrote:
>         On Sep 28, 6:05 pm, Iain Duncan <iainduncanli...@gmail.com>
>         wrote:
>         > Hey folks, I discovered that my zcml using includeOverrides
>         chokes when I
>         > upgrade to Pyramid 1.2. I have tested that the issue goes
>         away or reappears
>         > from doing nothing except switching my pyramid egg from 1.1
>         to 1.2
>         
>         
>         I've released a new version of pyramid_zcml (0.7) which I
>         believe
>         fixes this.  Can you try it and see?
>         
>         --
>         You received this message because you are subscribed to the
>         Google Groups "pylons-devel" group.
>         To post to this group, send email to
>         pylons-devel@googlegroups.com.
>         To unsubscribe from this group, send email to pylons-devel
>         +unsubscr...@googlegroups.com.
>         For more options, visit this group at
>         http://groups.google.com/group/pylons-devel?hl=en.
>         
> 


-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to