Hi all, I'm using the 1.3 branch of Pyramid, & when I add a url
dispatch route such as "config.add_route('user_edit', 'user/edit')", I
have no issues. But as soon as I add any variable in the the route
pattern (eg "config.add_route('user_edit', 'user/edit/{id}')"),
Pyramid is throwing an exception. Here is the traceback:

Traceback (most recent call last):
  File "c:\web\py27env\lib\site-packages\pyramid-1.3a2-py2.7.egg
\pyramid\mako_templating.py", line 154, in __call__
    result = template.render_unicode(**system)
  File "c:\web\py27env\lib\site-packages\mako-0.5.0-py2.7.egg\mako
\template.py", line 311, in render_unicode
    as_unicode=True)
  File "c:\web\py27env\lib\site-packages\mako-0.5.0-py2.7.egg\mako
\runtime.py", line 660, in _render
    **_kwargs_for_callable(callable_, data))
  File "c:\web\py27env\lib\site-packages\mako-0.5.0-py2.7.egg\mako
\runtime.py", line 692, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "c:\web\py27env\lib\site-packages\mako-0.5.0-py2.7.egg\mako
\runtime.py", line 718, in _exec_template
    callable_(context, *args, **kwargs)
  File "c:\web\py27env\pulse\pulse\templates/base.mako", line 44, in
render_body
    ${self.body()}
  File "c:\web\py27env\pulse\pulse\templates/uac/users.mako", line 6,
in render_body
    <%include file="users_index.mako"/>
  File "c:\web\py27env\lib\site-packages\mako-0.5.0-py2.7.egg\mako
\runtime.py", line 587, in _include_file
    callable_(ctx, **_kwargs_for_include(callable_, context._data,
**kwargs))
  File "c:\web\py27env\pulse\pulse\templates/uac/users_index.mako",
line 2, in render_body
    <%
  File "c:\web\py27env\lib\site-packages\pyramid-1.3a2-py2.7.egg
\pyramid\url.py", line 155, in route_url
    path = route.generate(kw) # raises KeyError if generate fails
  File "c:\web\py27env\lib\site-packages\pyramid-1.3a2-py2.7.egg
\pyramid\urldispatch.py", line 177, in generator
    return gen % newdict
KeyError: 'id'

Does anyone have any ideas as to what is going on here?

Cheers,

Bruce Coble

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

Reply via email to