Hi Alex,

did you check what os.sys.path outputs in a script run by GeoServer?
Maybe it's just that requests is not on an importable path?

All the best,
Tõnis

2017-09-04 4:38 GMT+03:00 Alex Chen via Geoserver-users
<[email protected]>:
> Dear all,
>
> I am with GeoServer 2.11.2 and am planning to do some scripting on it.
>
> I would like to run some custom Python scripts either as Apps that can be
> called via http or as WPS services. I have managed to install the scripts
> plugin on GeoServer, and the "apps" and "wps" folders are both visible in
> the "scripts" parent folder.
>
> I have tried to save some custom scripts in the apps folder and called via
> http, for instance, "http://localhost:8090/geoserver/script/apps/hello";, but
> it failed due to "unable to find packages". Those packages that GeoServer
> was unable to find include "requests" and "urllib2" etc but I am pretty sure
> they were both installed properly on the Python. I am wondering how
> GeoServer gets to know where the Python (2.7.13) directory is and how Python
> gets utilised by GeoServer on my computer via either http or wps.
>
> I have posted some questions on stackoverflow, but haven't received much
> positive reply.
>
> Much appreciated!
>
> Alex
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to this
> list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines:
> http://geoserver.org/comm/userlist-guidelines.html
>
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to