Hi Joel

I have opened an issue #405 re your question.

There is a quick and dirty hack if you must get this working right away and are 
ok forking Pyramid. The issue is happening because resolveConflicts stores the 
match_param in a tuple, and a string is hashable but a dict is not. Pyramid is 
passing its own tests because resolveConflicts is not called. Storing the 
string representation of the match_param dict in the discriminator will get 
things going again. One of the experts here might have a better suggestion for 
you but hope this helps. 

On 1 Feb 2012, at 09:03, Joel Kaiser <[email protected]> wrote:

> Hello,
> 
> I'm new to pyramid and so I'm reading the docs, trying and testing around.
> 
> Chapter "View Configuration"  describes arguments for the view_config 
> decorator. So I tried "match_param" as a string and a dict. If I'm using a 
> string everything works fine. If I'm using a dict I can't start waitress 
> cause of:
> 
> File 
> "/usr/local/pyramid-env/lib/python2.7/site-packages/pyramid-1.3a6-py2.7.egg/pyramid/config/__init__.py",
>  line 1083, in resolveConflicts
>     L = unique.setdefault(discriminator, [])
> TypeError: unhashable type: 'dict'
> 
> As you can see, I'm using pyramid 1.3a6, python2.7.2 and waitress 0.7 on an 
> ubuntu 10.10. Here Is what I've tried:
> 
> in main-method:
> config.add_route("test_route", "/{test1:[\d]+\.[\d]+}/")
> 
> in views/test.py:
> from pyramid.view import view_config, view_defaults
> from pyramid.response import Response
> 
> @view_defaults(route_name='test_route')
> class Testing(object):
>     def __init__(self, request):
>         self.request = request
> 
>     @view_config(match_param={'test1':'3.5'})
>     def __call__(self):
>         return Response(str("lala"))
> 
> What can I do?
> -- 
> 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.

-- 
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