Authenticated feeds can't be cached in Windows

David Bowen David at MyForest.Com
Sun Feb 24 07:40:14 EST 2008


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
http://lists.planetplanet.org/archives/devel.mbox/devel.mbox

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.

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 "../planet.py", line 167, in ?

    main()

  File "../planet.py", line 160, in main

    my_planet.run(planet_name, planet_link, template_files, offline)

  File "C:\Projects\planet\planet\__init__.py", line 240, in run

    channel = Channel(self, feed_url)

  File "C:\Projects\planet\planet\__init__.py", line 507, in __init__

    cache_file = dbhash.open(cache_filename, "c", 0666)

  File "C:\Python23\lib\dbhash.py", line 16, in open

    return bsddb.hashopen(file, flag, mode)

  File "C:\Python23\lib\bsddb\__init__.py", line 192, in hashopen

    d.open(file, 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 cache.py
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /archives/devel/attachments/20080223/74270c38/attachment.htm 


More information about the devel mailing list