popego / neocortex-api-python

Meaningtool Neocortex API Python Client
www.meaningtool.com
BSD 3-Clause "New" or "Revised" License
7 stars 2 forks source link

Not working with Google App Engine #3

Open marcogomes opened 14 years ago

marcogomes commented 14 years ago

I downloaded the source, pasted the "neocortex" folder inside my Google App Engine project folder and Imported it with from neocortex.client import NeocortexRestClient.

The following code: nc = NeocortexRestClient('mykey') ca = nc.categories(input)

Is raising the following error:

Traceback (most recent call last): File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/init.py", line 511, in call handler.get(*groups) File "/Users/marcogomes/Sites/boo-box/labs/writingabout/leica/main.py", line 59, in get ta = analyzeTwitterAccount(screen_name) File "/Users/marcogomes/Sites/boo-box/labs/writingabout/leica/main.py", line 148, in analyzeTwitterAccount meaning = loadMeaning(massa) File "/Users/marcogomes/Sites/boo-box/labs/writingabout/leica/main.py", line 196, in loadMeaning ca = nc.categories(input) File "/Users/marcogomes/Sites/boo-box/labs/writingabout/leica/neocortex/client.py", line 88, in categories return builder.format(ResponseFormats.JSON).input(input).categories(tree_key, additionals).meaningfy().payload["categories"] File "/Users/marcogomes/Sites/boo-box/labs/writingabout/leica/neocortex/client.py", line 64, in meaningfy raise e ImportError: No module named _ctypes

popego commented 14 years ago

Hi Marco,

We couldn't reproduce the error but there's apparently a problem with the GoogleAppEngineLauncher, python2.6 and the urllib module in OSX.

Please, try configuring your GoogleAppEngineLauncher in order to use python2.5 (which is GAE's default python version).

Look this thread for more information: http://code.google.com/p/googleappengine/issues/detail?id=985#c4