anyone else tried planet on windows?
brian.ewins at gmail.com
Thu Jan 19 05:53:41 EST 2006
I had a go at installing planet on windows today, as a way of
aggregating some internal feeds at work. I'm guessing this is pretty
uncommon from the arch dirs in the nightly - windows hates 'em.
Anyhoo, there's a couple of problems.
First off, the filenames used in the cache don't work. Took me a while
to figure this out, it appears as an unhelpful bsddb error:
File "C:\Program Files\Plone 2\Python\Lib\bsddb\__init__.py", line
192, in hashopen
d.open(file, db.DB_HASH, flags, mode)
bsddb._db.DBError: (5, 'Input/output error')
... I should have guessed what was coming from seeing the arch
filenames fail to expand, but it had barfed trying to open
I fixed this by adding a couple of lines to cache.py:
re_final_cruft = re.compile(r'[,.]*$')
+ re_other_cruft = re.compile(r'[^A-Za-z0-9]*')
filename = re_final_cruft.sub("", filename)
+ filename = re_other_cruft.sub("", filename)
which results in a filename of 'wwwgnomeorgjdubblogflavrss'. Hacks-r-us.
Planet then worked the first run, but failed on the second run -
htmltmpl couldn't lock the precompiled templates it had created on the
File "C:\j\planet-nightly\planet-nightly\planet\htmltmpl.py", line
285, in lock_file
msvcrt.locking(fd, msvcrt.LK_UNLCK, 1)
IOError: [Errno 13] Permission denied
Googling around (I know squat about python) it seems that there are
known problems with using msvcrt for locking? The htmltmpl code
suggests that you can't use the precompiled templates without locking,
so I fixed this by editing planet.py:
- manager = planet.htmltmpl.TemplateManager()
+ manager = planet.htmltmpl.TemplateManager(precompile = 0)
It seems to work ok now. I doubt these are fixes you'd want to
incorporate - the first one would clear all the caches on all the
planets out there, the second would make them run slower; I'm really
posting this for the benefit of google, so anyone else who runs into
the problems can find a solution.
Better fixes readily accepted :)
More information about the devel