I will, though I am convinced it works if just os.close(the handle) is
there and it works on other platforms.
I must first find out how to get the correct source
Is there a way to easy_install the trunk into a virtualenv directly or
should I get it first via svn?git or what is holding it?
Never mind that question, I'll find out.
Just in the process of drinking a beer (red horse, 1 ltr) - so it may
take some time.
On vacation in the phillipines
I am very excited about pyramid+chameleon.
I have been using cherrypy+simpletal up until now, so I am pleased
that chameleon (and tal) is built in, including the ability to take
the curly braces shortcut where applicable.
On Mon, Mar 14, 2011 at 4:33 PM, Malthe Borch
<email address hidden> wrote:
> I have reworked the loader somewhat, to an effect which should be the
> same as your patch. Can you try it out?
>
> Thanks!
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/731803
>
> Title:
> WindowsError when renaming temporary file
>
> Status in Attribute language template compiler:
> New
>
> Bug description:
> Following the tutorial pyramid-1.0.pdf, paragraph 5.6 on win XP I get the following at localhost:6543
> I am not sure whether the bug belongs here or over at pyramid, so bear with me.
>
> I worked around the following problem by inserting the line:
> os.close(fd)
> just after the line:
> fd, fn = tempfile.mkstemp(prefix=base, suffix='.tmp', dir=self.path)
> In the file builder.py inside ModuleLoader.build
>
>
> Module pyramid.chameleon_zpt:52 in __call__ view
> << except (TypeError, ValueError):
> raise ValueError('renderer was passed non-dictionary as value')
> result = self.template(**system)
> return result
> >> result = self.template(**system)
> Module chameleon.template:121 in __call__ view
> << def __call__(self, **kwargs):
> return self.render(**kwargs)
>
> def __repr__(self):
> >> return self.render(**kwargs)
> Module chameleon.zpt.template:96 in render view
> << setdefault("nothing", None)
>
> return super(PageTemplate, self).render(**kwargs)
>
> def include(self, stream, econtext, rcontext):
> >> return super(PageTemplate, self).render(**kwargs)
> Module chameleon.template:153 in render view
> << stream = self.output_stream_factory()
> econtext = rcontext.pop('econtext', False) or Scope(rcontext)
> self.cook_check()
> try:
> self._render(stream, econtext, rcontext)
> >> self.cook_check()
> Module chameleon.template:260 in cook_check view
> << if self._cooked is False:
> body = self.read()
> self.cook(body)
>
> def detect_encoding(self, body):
> >> self.cook(body)
> Module chameleon.template:134 in cook view
> << def cook(self, body):
> digest = self._digest(body)
> program = self._cook(body, digest)
>
> for name, function in program.items():
> >> program = self._cook(body, digest)
> Module chameleon.template:333 in _cook view
> << source = "# filename: %s\n#\n%s" % (self.filename, source)
>
> cooked = self.loader.build(source, name)
> except TemplateError:
> exc = sys.exc_info()[1]
> >> cooked = self.loader.build(source, name)
> Module chameleon.loader:112 in build view
> << raise
>
> os.rename(fn, name)
> log.debug("compiling %s into byte-code..." % filename)
> py_compile.compile(name)
> >> os.rename(fn, name)
>
> and furthermore (in the console)
>
> Traceback (most recent call last):
> File "C:\Python27\Lib\atexit.py", line 24, in _run_exitfuncs
> func(*targs, **kargs)
> File "D:\Users\Rendon\servage\pd\lib\site-packages\chameleon-2.0_rc5-py2.7.egg
> \chameleon\template.py", line 84, in cleanup
> shutil.rmtree(path)
> File "C:\Python27\Lib\shutil.py", line 249, in rmtree
> onerror(os.remove, fullname, sys.exc_info())
> File "C:\Python27\Lib\shutil.py", line 247, in rmtree
> os.remove(fullname)
> WindowsError: [Error 32] The process cannot access the file because it is being
> used by another process: 'c:\\docume~1\\user\\locals~1\\temp\\tmpwxeqh6\\mytempl
> ate_8612ea41c3c22dac09c97155d2364cf65886b7007bajdn.tmp'
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/chameleon.core/+bug/731803/+subscribe
>
--
med venlig hilsen / with kind regards
Jørgen G. Jørgensen.
---
I will, though I am convinced it works if just os.close(the handle) is
there and it works on other platforms.
I must first find out how to get the correct source
Is there a way to easy_install the trunk into a virtualenv directly or
should I get it first via svn?git or what is holding it?
Never mind that question, I'll find out.
Just in the process of drinking a beer (red horse, 1 ltr) - so it may
take some time.
On vacation in the phillipines
I am very excited about pyramid+chameleon.
I have been using cherrypy+simpletal up until now, so I am pleased
that chameleon (and tal) is built in, including the ability to take
the curly braces shortcut where applicable.
On Mon, Mar 14, 2011 at 4:33 PM, Malthe Borch /bugs.launchpad .net/bugs/ 731803 mkstemp( prefix= base, suffix='.tmp', dir=self.path) chameleon_ zpt:52 in __call__ view 'renderer was passed non-dictionary as value') **system) **system) template: 121 in __call__ view **kwargs) **kwargs) zpt.template: 96 in render view "nothing" , None) **kwargs) **kwargs) template: 153 in render view stream_ factory( ) pop('econtext' , False) or Scope(rcontext) stream, econtext, rcontext) template: 260 in cook_check view encoding( self, body): template: 134 in cook view template: 333 in _cook view build(source, name) build(source, name) loader: 112 in build view "compiling %s into byte-code..." % filename) compile( name) Lib\atexit. py", line 24, in _run_exitfuncs Rendon\ servage\ pd\lib\ site-packages\ chameleon- 2.0_rc5- py2.7.egg template. py", line 84, in cleanup Lib\shutil. py", line 249, in rmtree Lib\shutil. py", line 247, in rmtree 1\\user\ \locals~ 1\\temp\ \tmpwxeqh6\ \mytempl 22dac09c97155d2 364cf65886b7007 bajdn.tmp' /bugs.launchpad .net/chameleon. core/+bug/ 731803/ +subscribe
<email address hidden> wrote:
> I have reworked the loader somewhat, to an effect which should be the
> same as your patch. Can you try it out?
>
> Thanks!
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https:/
>
> Title:
> WindowsError when renaming temporary file
>
> Status in Attribute language template compiler:
> New
>
> Bug description:
> Following the tutorial pyramid-1.0.pdf, paragraph 5.6 on win XP I get the following at localhost:6543
> I am not sure whether the bug belongs here or over at pyramid, so bear with me.
>
> I worked around the following problem by inserting the line:
> os.close(fd)
> just after the line:
> fd, fn = tempfile.
> In the file builder.py inside ModuleLoader.build
>
>
> Module pyramid.
> << except (TypeError, ValueError):
> raise ValueError(
> result = self.template(
> return result
> >> result = self.template(
> Module chameleon.
> << def __call__(self, **kwargs):
> return self.render(
>
> def __repr__(self):
> >> return self.render(
> Module chameleon.
> << setdefault(
>
> return super(PageTemplate, self).render(
>
> def include(self, stream, econtext, rcontext):
> >> return super(PageTemplate, self).render(
> Module chameleon.
> << stream = self.output_
> econtext = rcontext.
> self.cook_check()
> try:
> self._render(
> >> self.cook_check()
> Module chameleon.
> << if self._cooked is False:
> body = self.read()
> self.cook(body)
>
> def detect_
> >> self.cook(body)
> Module chameleon.
> << def cook(self, body):
> digest = self._digest(body)
> program = self._cook(body, digest)
>
> for name, function in program.items():
> >> program = self._cook(body, digest)
> Module chameleon.
> << source = "# filename: %s\n#\n%s" % (self.filename, source)
>
> cooked = self.loader.
> except TemplateError:
> exc = sys.exc_info()[1]
> >> cooked = self.loader.
> Module chameleon.
> << raise
>
> os.rename(fn, name)
> log.debug(
> py_compile.
> >> os.rename(fn, name)
>
> and furthermore (in the console)
>
> Traceback (most recent call last):
> File "C:\Python27\
> func(*targs, **kargs)
> File "D:\Users\
> \chameleon\
> shutil.rmtree(path)
> File "C:\Python27\
> onerror(os.remove, fullname, sys.exc_info())
> File "C:\Python27\
> os.remove(fullname)
> WindowsError: [Error 32] The process cannot access the file because it is being
> used by another process: 'c:\\docume~
> ate_8612ea41c3c
>
> To unsubscribe from this bug, go to:
> https:/
>
--
med venlig hilsen / with kind regards
Jørgen G. Jørgensen.
---