Using absolute paths

Tim Bornholtz tim at bornholtz.com
Wed May 24 14:08:10 EST 2006


I've set up planetplanet and everything runs fine if I'm in the base
directory.  However when I'm in any other directory and run the
planet.py script with an absolute path and also an absolute path to my
config file I get errors.

I have modified the config.ini to make all of the files in there be
absolute paths too.

Here is my error

from $:/planet.bornholtz.com>
/homepages/45/d116174175/htdocs/planet.bornholtz.com/planet.py
/homepages/45/d116174175/htdocs/planet.bornholtz.com/bornholtz/fancy/config.ini

and everything is good.

If I am in any other directory

$:> /homepages/45/d116174175/htdocs/planet.bornholtz.com/planet.py
/homepages/45/d116174175/htdocs/planet.bornholtz.com/bornholtz/fancy/config.ini

it reads all of the feeds correctly and then spits out:

INIT DONE
INFO:planet.runner:Processing template
/homepages/45/d116174175/htdocs/planet.bornholtz.com/bornholtz/fancy/index.html.tmpl
LOADING PRECOMPILED
TEMPLATE: NOT UPTODATE: bornholtz/fancy/index.html.tmpl
PRECOMPILED: NOT UPTODATE
UPDATE
COMPILING FROM FILE: bornholtz/fancy/index.html.tmpl
READING: bornholtz/fancy/index.html.tmpl
Traceback (most recent call last):
  File "/homepages/45/d116174175/htdocs/planet.bornholtz.com/planet.py",
line 167, in ?
    main()
  File "/homepages/45/d116174175/htdocs/planet.bornholtz.com/planet.py",
line 163, in main
    planet_link, planet_feed, owner_name, owner_email)
  File "/usr/lib/python2.2/site-packages/PIL/__init__.py", line 256,
in generate_all_files
    # ;-)
  File "/homepages/45/d116174175/htdocs/planet.bornholtz.com/planet/htmltmpl.py",
line 219, in prepare
    compiled = self.update(precompiled)
  File "/homepages/45/d116174175/htdocs/planet.bornholtz.com/planet/htmltmpl.py",
line 248, in update
    updated = self.compile(template.file())
  File "/homepages/45/d116174175/htdocs/planet.bornholtz.com/planet/htmltmpl.py",
line 296, in compile
    self._debug).compile(file)
  File "/homepages/45/d116174175/htdocs/planet.bornholtz.com/planet/htmltmpl.py",
line 987, in compile
    tokens = self.parse(self.read(file))
  File "/homepages/45/d116174175/htdocs/planet.bornholtz.com/planet/htmltmpl.py",
line 1037, in read
    raise TemplateError, "IO error while reading template '%s': "\
planet.htmltmpl.TemplateError: Htmltmpl error: IO error while reading
template 'bornholtz/fancy/index.html.tmpl': (2) No such file or
directory


I've tried deleting all of the pyc files and trying it again but to no
avail.  Any help would be greatly appreciated.

Thanks,
Tim


More information about the devel mailing list