ODM2 / WOFpy

A server-side implementation of CUAHSI's Water One Flow service stack in Python.
http://odm2.github.io/WOFpy/
9 stars 9 forks source link

Better unicode handling. #158

Closed lsetiawan closed 7 years ago

lsetiawan commented 7 years ago

This PR addresses https://github.com/ODM2/WOFpy/issues/148.

This way of handling unicode was suggested by @ocefpaf.

Still waiting for PR https://github.com/ODM2/WOFpy/pull/156 to have the tests for unicodes.

miguelcleon commented 7 years ago

@lsetiawan @emiliom Works now!

http://dev-odm2admin.cuahsi.org/wofpy/odm2timeseries/rest/1_1/GetSites

ocefpaf commented 7 years ago

LGTM @lsetiawan

emiliom commented 7 years ago

Works now! http://dev-odm2admin.cuahsi.org/wofpy/odm2timeseries/rest/1_1/GetSites

Woo-hoo! (though, FYI, I clicked on it just now and the request is taking forever; I'm guessing it'll time out)

Great work, @lsetiawan !

@ocefpaf, what does "LGTM" mean??

lsetiawan commented 7 years ago

LGTM: Looks Good To Me 😄

ocefpaf commented 7 years ago

LGTM is GitHub talk to "Looks Good To Merge/Me"

miguelcleon commented 7 years ago

@emiliom that is odd, it did not take long at all before, we maybe encountering another issue. Sure enough it is taking forever now.

lsetiawan commented 7 years ago

@miguelcleon I was able to open it about 5 min ago...

emiliom commented 7 years ago

LGTM: Ok, now I can talk like the cool kids ...

miguelcleon commented 7 years ago

Yes, eventually I got the below error, referenced in https://github.com/ODM2/WOFpy/issues/150


<ns0:Fault xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>soap11env:Server</faultcode>
<faultstring>
(psycopg2.OperationalError) SSL SYSCALL error: EOF detected [SQL: 'SELECT DISTINCT odm2.sites.samplingfeatureid AS odm2_sites_samplingfeatureid, odm2.samplingfeatures.samplingfeatureid AS odm2_samplingfeatures_samplingfeatureid, odm2.sites.spatialreferenceid AS odm2_sites_spatialreferenceid, odm2.sites.sitetypecv AS odm2_sites_sitetypecv, odm2.sites.latitude AS odm2_sites_latitude, odm2.sites.longitude AS odm2_sites_longitude, odm2.samplingfeatures.samplingfeatureuuid AS odm2_samplingfeatures_samplingfeatureuuid, odm2.samplingfeatures.samplingfeaturetypecv AS odm2_samplingfeatures_samplingfeaturetypecv, odm2.samplingfeatures.samplingfeaturecode AS odm2_samplingfeatures_samplingfeaturecode, odm2.samplingfeatures.samplingfeaturename AS odm2_samplingfeatures_samplingfeaturename, odm2.samplingfeatures.samplingfeaturedescription AS odm2_samplingfeatures_samplingfeaturedescription, odm2.samplingfeatures.samplingfeaturegeotypecv AS odm2_samplingfeatures_samplingfeaturegeotypecv, odm2.samplingfeatures.elevation_m AS odm2_samplingfeatures_elevation_m, odm2.samplingfeatures.elevationdatumcv AS odm2_samplingfeatures_elevationdatumcv, odm2.samplingfeatures.featuregeometrywkt AS odm2_samplingfeatures_featuregeometrywkt, CASE WHEN (odm2.samplingfeatures.samplingfeaturetypecv = %(samplingfeaturetypecv_1)s) THEN %(param_1)s WHEN (odm2.samplingfeatures.samplingfeaturetypecv = %(samplingfeaturetypecv_2)s) THEN %(param_2)s ELSE %(param_3)s END AS _sa_polymorphic_on \nFROM odm2.samplingfeatures JOIN odm2.sites ON odm2.samplingfeatures.samplingfeatureid = odm2.sites.samplingfeatureid JOIN odm2.featureactions ON odm2.samplingfeatures.samplingfeatureid = odm2.featureactions.samplingfeatureid JOIN (odm2.results JOIN odm2.timeseriesresults ON odm2.results.resultid = odm2.timeseriesresults.resultid) ON odm2.featureactions.featureactionid = odm2.results.featureactionid \nWHERE odm2.featureactions.samplingfeatureid = odm2.sites.samplingfeatureid AND odm2.results.featureactionid = odm2.featureactions.featureactionid'] [parameters: {'param_1': 'Specimen', 'param_2': 'Site', 'samplingfeaturetypecv_2': 'Site', 'param_3': 'samplingfeatures', 'samplingfeaturetypecv_1': 'Specimen'}]
</faultstring>
<faultactor/>
</ns0:Fault>
miguelcleon commented 7 years ago

So this server is currently in the 'server fault state' is there something we could investigate about this? I'm available for a call. If I reload apache it will resume functioning.

lsetiawan commented 7 years ago

@miguelcleon Could you follow up further discussion about the SSL error in #150, rather than the PR? Thanks!