Dominic, Unfortunately the private WMS I have been testing it on is owned by somebody else and I just have a very temporary username/password. I could set up a dummy one, just a basic http auth protected capabilities xml document, but I don't have an actual map server set up.
I have been using the using OWSLib recently for a project I have been working on and during the course of coding/testing I have found a few things. Instead of putting it here I will start a new thread and include a possible patch for these issues. Thanks, Angus --- On Mon, 3/8/10, [email protected] <[email protected]> wrote: > From: [email protected] <[email protected]> > Subject: Re: [Community] WMS with Auth fails (Revision: 1566) > To: [email protected], [email protected] > Received: Monday, March 8, 2010, 6:58 AM > Hi Angus, > > Thanks for spotting that. This bug slipped through as we > don't have a suitable WMS server to test authentication > against. I suppose I could set one up, but do you have one > available I could use? (let me know offline if you don't > want it made public). > > Thanks also for your other message (about error handling > and capabilities). I have been away recently but will try > and make time to put these changes in the trunk soon. > > Regards > Dominic > > > -----Original Message----- > From: [email protected] > on behalf of Angus Dickey > Sent: Sun 07/03/2010 19:55 > To: [email protected] > Subject: [Community] WMS with Auth fails (Revision: 1566) > > Hi, > > Using OWSLib with authentication fails on the latest build. > I noticed that the code to do Basic HTTP authentication was > recently moved to util.py from wms.py. It looks like when > this happened a few old variable names came along for the > ride, specifically the section: > > if username and password: > # Provide login information in > order to use the WMS server > # Create an OpenerDirector with > support for Basic HTTP > # Authentication... > passman = > HTTPPasswordMgrWithDefaultRealm() > passman.add_password(None, > self.url, self.username, self.password) > auth_handler = > HTTPBasicAuthHandler(passman) > opener = > build_opener(auth_handler) > openit = opener.open > else: > openit = urlopen > > > should probably be: > > > if username and password: > # Provide login information in > order to use the WMS server > # Create an OpenerDirector with > support for Basic HTTP > # Authentication... > passman = > HTTPPasswordMgrWithDefaultRealm() > passman.add_password(None, > url_base, username, password) > auth_handler = > HTTPBasicAuthHandler(passman) > opener = > urllib2.build_opener(auth_handler) > openit = opener.open > else: > openit = urlopen > > Anyway this seems to fix the problem (I have attached the > util.py file). Does this make sense? I could be missing > something... > > Thanks, > > Angus > > > > __________________________________________________________________ > Looking for the perfect gift? Give the gift of Flickr! > > http://www.flickr.com/gift/ > > -- > Scanned by iCritical. > _______________________________________________ > Community mailing list > [email protected] > http://lists.gispython.org/mailman/listinfo/community > __________________________________________________________________ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com _______________________________________________ Community mailing list [email protected] http://lists.gispython.org/mailman/listinfo/community
