Authenticated feeds can't be cached in Windows

Baz brian.ewins at
Sun Feb 24 10:27:06 EST 2008

On Sat, Feb 23, 2008 at 8:40 PM, David Bowen <David at> wrote:
> Hi there,
>  I'm new to planet as a creator, but I've been happily reading many
> planet-sourced pages for years.
>  Apologies if this has been raised before, I couldn't find a reference in
>  I'm trying to incroporate a feed which requires authentication. Yes, HTTP
> Basic Authentication suffices for me in this case. I can see the discussion
> from October 11th 2004 chatting about this, but nothing concrete.

There was a similar problem in the past, see

the regexps have changed a bit since then but the problem with them is
still the same: rather than only allowing a safe character set, they
attempt to exclude specific unsafe characters. There can also a
problem on windows with large path lengths generated in the caches. I
can understand wanting the filename to be readable, but using the hex
of a hash of the URL is probably a better choice here.

>  So I've got my feed working OK:
>  [http://user:password@server]
>  but when the cache kicks in the colon in the URL causes it to fail with
> this message:
>  Traceback (most recent call last):
>    File "../", line 167, in ?
>      main()
>    File "../", line 160, in main
>, planet_link, template_files, offline)
>    File "C:\Projects\planet\planet\", line 240, in run
>      channel = Channel(self, feed_url)
>    File "C:\Projects\planet\planet\", line 507, in __init__
>      cache_file =, "c", 0666)
>    File "C:\Python23\lib\", line 16, in open
>      return bsddb.hashopen(file, flag, mode)
>    File "C:\Python23\lib\bsddb\", line 192, in hashopen
>, db.DB_HASH, flags, mode)
>  bsddb._db.DBNoSuchFileError: (2, 'No such file or directory --
> cache\\user:password at server: No such file or directory')
>  (I've cleaned up those URLs to protect the innocent)
>  The problem appears to be in the cache file creation, so I edited
> as follows:
>  re_slash         = re.compile(r'[?/]+')
>  became:
>  re_slash         = re.compile(r'[?/:]+')
>  So that's basically a hack to add colon to the regex.
>  I thought you might want to know in case it's affecting other Windows
> users.
>  BTW the username and the server path both contain the "@" symbol too in my
> case so it's actually a little more complex than I'm showing here.
>  David Bowen
> --
>  devel mailing list
>  devel at

More information about the devel mailing list