[Featureserver] Assorted problems

Peter Robins fs at peterrobins.co.uk
Fri Mar 27 10:47:37 EDT 2009


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. I'll try again. Should trunk be in good working order, then?



More information about the Featureserver mailing list