I see. I actually did include pyramid_mako and then added settings from a
file using config.add_settings. But simply switching the order - I now
include pyramid_mako after add_settings({'mako.directories': 'pkg1:path1
pkg2path2'}) - does not help. Same error


On Mon, Oct 21, 2013 at 5:06 PM, Michael Merickel <mmeri...@gmail.com>wrote:

> Are the settings set prior to doing config.include('pyramid_mako') ? The
> old version of the library did not configure the renderer until the first
> view was rendered. This deferred setup requiring mutex locks etc was just
> removed but could explain the situation.
>
>
> On Mon, Oct 21, 2013 at 10:01 AM, Robert Forkel 
> <xrotw...@googlemail.com>wrote:
>
>> I got the traceback below - no debugtoolbar involved, but pyramid_exclog
>> to email the error. What I do know is: downgrading to pyramid_mako==0.2
>> fixed the problem and I have a mako.directories setting that lists two
>> directories. I'll try to reproduce in my local environment (that happened
>> when deploying to the test server, which pulled in more recent versions of
>> dependencies than I use on my dev box).
>>
>> Traceback (most recent call last):
>>   File
>> "/usr/venvs/waab/local/lib/python2.7/site-packages/pyramid_exclog/__init__.py",
>> line 111, in exclog_tween
>>     return handler(request)
>>   File
>> "/usr/venvs/waab/local/lib/python2.7/site-packages/pyramid_tm/__init__.py",
>> line 82, in tm_tween
>>     reraise(*exc_info)
>>   File
>> "/usr/venvs/waab/local/lib/python2.7/site-packages/pyramid_tm/__init__.py",
>> line 63, in tm_tween
>>     response = handler(request)
>>   File
>> "/usr/venvs/waab/local/lib/python2.7/site-packages/pyramid/router.py", line
>> 161, in handle_request
>>     response = view_callable(context, request)
>>   File
>> "/usr/venvs/waab/local/lib/python2.7/site-packages/pyramid/config/views.py",
>> line 377, in viewresult_to_response
>>     result = view(context, request)
>>   File "/usr/venvs/waab/src/clld/clld/web/views/__init__.py", line 62, in
>> resource_view
>>     return view(IRepresentation, ctx, req)
>>   File "/usr/venvs/waab/src/clld/clld/web/views/__init__.py", line 52, in
>> view
>>     return adapter.render_to_response(ctx, req)
>>   File "/usr/venvs/waab/src/clld/clld/web/adapters/base.py", line 38, in
>> render_to_response
>>     res = Response(self.render(ctx, req))
>>   File "/usr/venvs/waab/src/clld/clld/web/adapters/base.py", line 46, in
>> render
>>     return pyramid_render(self.template, {'ctx': ctx}, request=req)
>>   File
>> "/usr/venvs/waab/local/lib/python2.7/site-packages/pyramid/renderers.py",
>> line 88, in render
>>     return helper.render(value, None, request=request)
>>   File
>> "/usr/venvs/waab/local/lib/python2.7/site-packages/pyramid/renderers.py",
>> line 557, in render
>>     result = renderer(value, system_values)
>>   File
>> "/usr/venvs/waab/local/lib/python2.7/site-packages/pyramid_mako/__init__.py",
>> line 140, in __call__
>>     template = self.implementation()
>>   File
>> "/usr/venvs/waab/local/lib/python2.7/site-packages/pyramid_mako/__init__.py",
>> line 119, in implementation
>>     return self.lookup.get_template(self.path)
>>   File
>> "/usr/venvs/waab/local/lib/python2.7/site-packages/pyramid_mako/__init__.py",
>> line 80, in get_template
>>     return TemplateLookup.get_template(self, uri)
>>   File
>> "/usr/venvs/waab/local/lib/python2.7/site-packages/mako/lookup.py", line
>> 248, in get_template
>>     "Cant locate template for uri %r" % uri)
>> TopLevelLookupException: Cant locate template for uri
>> 'dataset/detail_html.mako'
>>
>>
>> On Mon, Oct 21, 2013 at 4:47 PM, Michael Merickel 
>> <mich...@merickel.org>wrote:
>>
>>> Hey Robert, pyramid_mako should not be ignoring your settings. Can you
>>> paste an error message?. Are you getting an actual error, or something
>>> else? The issue I expect to see is that the debugtoolbar needs to be
>>> upgraded to at least 1.0.9, as it depends on pyramid_mako 0.3+ because
>>> prior to that it was using private APIs.
>>>
>>> - Michael
>>>
>>>
>>> On Mon, Oct 21, 2013 at 5:43 AM, Robert Forkel 
>>> <xrotw...@googlemail.com>wrote:
>>>
>>>> Hi,
>>>> following the note on
>>>> http://docs.pylonsproject.org/projects/pyramid/en/master/whatsnew-1.5.htmlthat
>>>>  says it's fine to install pyramid-mako into older pyramid
>>>> installations, I ended up with a broken app, because as far as i can tell,
>>>> starting with 0.3 pyramid-mako doesn't take settings into account anymore.
>>>> So my "mako.directories" setting was ignored and templates not found.
>>>> So I guess this note should be removed.
>>>> best
>>>> robert
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "pylons-discuss" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to pylons-discuss+unsubscr...@googlegroups.com.
>>>> To post to this group, send email to pylons-discuss@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/pylons-discuss.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "pylons-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to pylons-discuss+unsubscr...@googlegroups.com.
>>> To post to this group, send email to pylons-discuss@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/pylons-discuss.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "pylons-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pylons-discuss+unsubscr...@googlegroups.com.
>> To post to this group, send email to pylons-discuss@googlegroups.com.
>> Visit this group at http://groups.google.com/group/pylons-discuss.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pylons-discuss+unsubscr...@googlegroups.com.
> To post to this group, send email to pylons-discuss@googlegroups.com.
> Visit this group at http://groups.google.com/group/pylons-discuss.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to