[Python-apps-team] Bug#761814: generating RSS output fails, Htmltmpl error: Cannot save precompiled templates
Daniel Pocock
daniel at pocock.pro
Tue Sep 16 08:43:41 UTC 2014
Package: planet-venus
Version: 0~bzr116-1
By default, planet generates a HTML output and an Atom feed
It is also desirable to publish an RSS feed. Planet includes a template
for RSS output, but when I add the following in planet.ini:
template_files = /usr/share/planet-venus/theme/common/atom.xml.xslt
/usr/share/planet-venus/theme/common/rss20.xml.tmpl
it fails with an error:
Traceback (most recent call last):
File "/usr/bin/planet", line 138, in <module>
splice.apply(doc.toxml('utf-8'))
File "/usr/lib/pymodules/python2.7/planet/splice.py", line 118, in apply
output_file = shell.run(template_file, doc)
File "/usr/lib/pymodules/python2.7/planet/shell/__init__.py", line 66,
in run
module.run(template_resolved, doc, output_file, options)
File "/usr/lib/pymodules/python2.7/planet/shell/tmpl.py", line 252, in run
template = manager.prepare(script)
File "/usr/lib/pymodules/python2.7/htmltmpl.py", line 223, in prepare
self.save_precompiled(compiled)
File "/usr/lib/pymodules/python2.7/htmltmpl.py", line 366, in
save_precompiled
% template_dir
htmltmpl.TemplateError: Htmltmpl error: Cannot save precompiled
templates to '/usr/share/planet-venus/theme/common': write permission
denied.
I tried creating a directory for the templates under the cache directory
and creating symlinks to the original template files and then
configuring it:
template_files = cache/templates/atom.xml.xslt
cache/templates/rss20.xml.tmpl
It also fails with the same error.
If I copy the template files to the cache directory (instead of using
symlinks) then it works, but keeping copies of these files doesn't seem
like a good idea.
More information about the Python-apps-team
mailing list