Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Mako generated paths don't always work on Windows #512

Themanwithoutaplan opened this Issue · 3 comments

2 participants


This is based on an error from the debugtoolbar demo that will not run on Windows because path names containing ":" are illegal on Windows. Original issue Pylons/pyramid_debugtoolbar#58 (comment)

Files required are at

Sample traceback
Traceback (most recent call last):
File "c:\python27\Lib\wsgiref\", line 85, in run
self.result = application(self.environ, self.start_response)
File "C:\Temp\sprint\lib\site-packages\pyramid\", line 187, in call
response = self.handle_request(request)
File "C:\Temp\sprint\lib\site-packages\pyramid\", line 20, in excview
response = handler(request)
File "C:\Temp\sprint\lib\site-packages\pyramid\", line 164, in handle
response = view_callable(context, request)
File "C:\Temp\sprint\lib\site-packages\pyramid\config\", line 350, in
File "C:\Temp\sprint\lib\site-packages\pyramid\", line 396, in ren
return self.render_to_response(response, system, request=request)
File "C:\Temp\sprint\lib\site-packages\pyramid\", line 426, in ren
result = self.render(value, system_values, request=request)
File "C:\Temp\sprint\lib\site-packages\pyramid\", line 422, in ren
result = renderer(value, system_values)
File "C:\Temp\sprint\lib\site-packages\pyramid\", line 171,
in __call

template = self.implementation()
File "C:\Temp\sprint\lib\site-packages\pyramid\", line 158,
in implementation
return self.lookup.get_template(self.path)
File "C:\Temp\sprint\lib\site-packages\pyramid\", line 60, i
n get_template
return self.load(srcfile, uri)
File "C:\Temp\sprint\lib\site-packages\mako\", line 299, in _load
File "C:\Temp\sprint\lib\site-packages\mako\", line 267, in __init

module = self.compile_from_file(path, filename)
File "C:\Temp\sprint\lib\site-packages\mako\", line 306, in compil
File "C:\Temp\sprint\lib\site-packages\mako\", line 104, in verify_dire
os.makedirs(dir, 0775)
File "C:\Temp\sprint\lib\", line 157, in makedirs
mkdir(name, mode)
WindowsError: [Error 267] Der Verzeichnisname ist ungⁿltig: 'C:\Temp\sprint\t
.psf - - [26/Mar/2012 14:48:25] "GET /favicon.ico HTTP/1.1" 500 59


Thanks! I've fixed this in the master and the 1.3 branch. See 4321a44 for details.

@mcdonc mcdonc closed this

Colour me stupid but I don't quite understand the logic of the chosen paths as they stand: "main:templates" doesn't look to me like a path (well, an old-style Mac OS one maybe) but like something out of setuptools. I'm guessing that that is the reason: mirroring some kind of egg structure? Anyway glad to have been able to help.

@wwitzel3 wwitzel3 referenced this issue from a commit in wwitzel3/pyramid
@mcdonc mcdonc speculative fix for issue #512 cedf57c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.