Closed eka closed 14 years ago
In [1]: from neocortex.client import NeocortexRestClient
In [2]: nc = NeocortexRestClient('mt-xxx') # key removed here
MeaningtoolError Traceback (most recent call last)
/Users/eka/dev/web/sites/tests/opencalais/ in ()
/Users/eka/dev/web/sites/tests/opencalais/lib/python2.6/site-packages/neocortex/client.py in keywords(self, input) 90 def keywords(self, input): 91 builder = self.get_builder() ---> 92 return builder.format(ResponseFormats.JSON).input(input).keywords().meaningfy().payload["keywords"] 93 94 def entities(self, input):
/Users/eka/dev/web/sites/tests/opencalais/lib/python2.6/site-packages/neocortex/client.py in meaningfy(self) 62 res = self.post(url, self._params, response_format=self._format) 63 except Exception, e: ---> 64 raise e 65 finally: 66 self._reset()
MeaningtoolError: Oops, some unexpected error occurred.
It should be fixed in the next deploy of meaningtool (hopefully today).
The error occurred because the input text is too short (It was not properly informed though).
Thanks.
In [1]: from neocortex.client import NeocortexRestClient
In [2]: nc = NeocortexRestClient('mt-xxx') # key removed here
In [3]: nc.keywords('I want to buy a new car')
MeaningtoolError Traceback (most recent call last)
/Users/eka/dev/web/sites/tests/opencalais/ in ()
/Users/eka/dev/web/sites/tests/opencalais/lib/python2.6/site-packages/neocortex/client.py in keywords(self, input) 90 def keywords(self, input): 91 builder = self.get_builder() ---> 92 return builder.format(ResponseFormats.JSON).input(input).keywords().meaningfy().payload["keywords"] 93 94 def entities(self, input):
/Users/eka/dev/web/sites/tests/opencalais/lib/python2.6/site-packages/neocortex/client.py in meaningfy(self) 62 res = self.post(url, self._params, response_format=self._format) 63 except Exception, e: ---> 64 raise e 65 finally: 66 self._reset()
MeaningtoolError: Oops, some unexpected error occurred.