[Featureserver] Assorted problems

Christopher Schmidt crschmidt at metacarta.com
Fri Mar 27 10:53:19 EDT 2009


On Fri, Mar 27, 2009 at 02:47:37PM +0000, Peter Robins wrote:
> thank you for your usual prompt reply
> 
> On Friday 27 Mar 2009, Christopher Schmidt wrote:
> > You're trying to upload KML data? If so, yes, it seems that this is not
> > supported. Patches welcome.
> 
> yes, initial load of features using curl -d. As it's just a one-off, I can 
> convert to another format and use that.
> 
> > > 2. querying e.g. "?queryable=title&title=Trinidad" doesn't work;
> > > something to do with utf8 data in the field you're querying?
> > >   'ascii' codec can't encode character u'\xe9' in position 12: ordinal
> > > not in range(128)
> > > ...
> > >   File "/var/www/cgi-bin/FeatureServer/DataSource/DBM.py", line 108, in
> > > select (key in props and str(props[key]) != val):
> >
> > Yeah, using 'str' like that is a bug. Should be str(props[key],
> > "utf-8"). If you test that and it works, give me a patch and I'll apply
> > it.
> 
> no, that gives me "str() takes at most 1 argument". Afraid my knowledge of 
> Python is pretty much non-existent. I tried "props[key].encode("utf-8")" 
> which does not give me an error and works if I query with an ascii criterion, 
> but returns an empty set if my criterion includes non-ascii chars. For 
> example, title contains 'Inglés', 'Ingl\u00e9s' in json-speak; if I query 
> title=Ingl%E9s, returns 0 features. I'm using python 2.5.2 if that's 
> relevant.
> 
> > FeatureServer/Feature.py no longer exists in trunk; it is moved into
> > vectorformats/Feature.py (and it is there and works).
> 
> ah, right, so it's no longer part of featureserver :-) I only did
> checkout for featureserver. 

Checking out FeatureServer trunk should automatically pull in the
vectorformats and web_request externals, so you should have those
directories inside your featureserver checkout. Do you not? 

> I'll try again. Should trunk be in good working order, then?

Trunk is what I use when I need FeatureServer, and I'm not aware of any
problems.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Featureserver mailing list