kengz / aiva

AIVA (A.I. Virtual Assistant): General-purpose virtual assistant for developers.
http://kengz.me/aiva/
MIT License
824 stars 597 forks source link

output is null #29

Closed japel closed 8 years ago

japel commented 8 years ago

As discussed in https://github.com/kengz/aiva/issues/28#issuecomment-259137410 aiva is returning null as output:

[Tue Nov 08 2016 13:24:25 GMT+0000 (utc)] INFO Receiving message_id: XXXX
[Tue Nov 08 2016 13:24:25 GMT+0000 (utc)] DEBUG Started global js socketIO client for TELEGRAM at 6466
[Tue Nov 08 2016 13:24:25 GMT+0000 (utc)] DEBUG Added a callback to hasher for global-client
[Tue Nov 08 2016 13:24:25 GMT+0000 (utc)] DEBUG global-client-js PyIHtjUvUqrZHnUUAAAD joined, -2 remains
[Tue Nov 08 2016 13:24:25 GMT+0000 (utc)] INFO All 4 IO clients have joined
[Tue Nov 08 2016 13:24:25 GMT+0000 (utc)] DEBUG IO on pass, msg: {
  "hash": "global-client-js_4ea7f9bc23a43715e7a10bec65876642",
  "from": "global-client-js",
  "input": "Hello there",
  "to": "nlp.cgkb-py",
  "intent": "parse"
} fn: undefined
[Tue Nov 08 2016 13:24:25 GMT+0000 (utc)] DEBUG IO on pass, msg: {
  "from": "cgkb-py",
  "output": null,
  "hash": "global-client-js_4ea7f9bc23a43715e7a10bec65876642",
  "to": "global-client-js"
} fn: undefined
[Tue Nov 08 2016 13:24:25 GMT+0000 (utc)] DEBUG hash string exists for global-client
[Tue Nov 08 2016 13:24:25 GMT+0000 (utc)] DEBUG hasher.handle invoking cb for global-client
[Tue Nov 08 2016 13:24:25 GMT+0000 (utc)] DEBUG hash string exists for global-client
[Tue Nov 08 2016 13:24:25 GMT+0000 (utc)] DEBUG hasher.handle invoking cb for global-client
[Tue Nov 08 2016 13:24:25 GMT+0000 (utc)] DEBUG hash string exists for global-client
[Tue Nov 08 2016 13:24:25 GMT+0000 (utc)] DEBUG hasher.handle invoking cb for global-client
[Tue Nov 08 2016 13:24:26 GMT+0000 (utc)] INFO Sending message to room: XXXXXXX

Node.js: 6.9.1 OS: Distributor ID: Debian Description: Debian GNU/Linux 8.6 (jessie) Release: 8.6 Codename: jessie

pip list shows: cloudpickle (0.2.1) cymem (1.31.2) Cython (0.25.1) murmurhash (0.26.4) numpy (1.11.2) pathlib (1.0.1) pip (9.0.1) plac (0.9.6) preshed (0.46.4) requests (2.11.1) semver (2.7.1) setuptools (28.8.0) six (1.10.0) socketIO-client (0.7.0) spacy (1.2.0) sputnik (0.9.3) thinc (5.0.8) ujson (1.35) virtualenv (1.11.6) websocket-client (0.37.0) wheel (0.29.0)

@kengz could you point me on how to know with which version of python spacy was installed, I have both: $ python3 --version Python 3.4.2 $ python --version Python 2.7.9

japel commented 8 years ago

Oh, I see you commented AIVA calls python3

kengz commented 8 years ago

yep. can u see if python3 -m pip list shows spacy? or otherwise test the spacy import etc in a python3 session?

japel commented 8 years ago

output of python3 -m pip list: cloudpickle (0.2.1) cymem (1.31.2) Cython (0.25.1) murmurhash (0.26.4) numpy (1.11.2) pathlib (1.0.1) pip (9.0.1) plac (0.9.6) preshed (0.46.4) requests (2.11.1) semver (2.7.1) setuptools (28.8.0) six (1.10.0) socketIO-client (0.7.0) spacy (1.2.0) sputnik (0.9.3) thinc (5.0.8) ujson (1.35) virtualenv (1.11.6) websocket-client (0.37.0) wheel (0.29.0)

kengz commented 8 years ago

Hmm. Ok will take a look after work later. The problem is in python - either the transport for socket.io client, or the wrapper nlp.py

On Nov 8, 2016, 8:49 AM -0500, Jan Viktor Apel notifications@github.com, wrote:

output of python3 -m pip list: cloudpickle (0.2.1) cymem (1.31.2) Cython (0.25.1) murmurhash (0.26.4) numpy (1.11.2) pathlib (1.0.1) pip (9.0.1) plac (0.9.6) preshed (0.46.4) requests (2.11.1) semver (2.7.1) setuptools (28.8.0) six (1.10.0) socketIO-client (0.7.0) spacy (1.2.0) sputnik (0.9.3) thinc (5.0.8) ujson (1.35) virtualenv (1.11.6) websocket-client (0.37.0) wheel (0.29.0)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub (https://github.com/kengz/aiva/issues/29#issuecomment-259140713), or mute the thread (https://github.com/notifications/unsubscribe-auth/AH1Db_9z-zufZJa9jzB-huYirV2fyU2wks5q8H3zgaJpZM4KscMK).

japel commented 8 years ago

I think I might know the problem... As for tutorials always apply, people (for not saying just me) often just copy/paste stuff... I might have copy pasted python -m spacy.en.download from the blog post, which downloads and installs the models in a python version specific path... so, perhaps spacy just does not find the models, as I should have ran this instead? python3 -m spacy.en.download

I'll double check this, and let you know

japel commented 8 years ago

@kengz as suspected: It was missing spacy models (because of using the wrong python version to download them)

Thank you very much for your help!

kengz commented 8 years ago

Ahaha. Thanks again for catching the issues and doing it so quickly!

On Nov 8, 2016, 10:36 AM -0500, Jan Viktor Apel notifications@github.com, wrote:

@kengz (https://github.com/kengz) as suspected: It was missing spacy models (because of using the wrong python version to download them)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub (https://github.com/kengz/aiva/issues/29#issuecomment-259165794), or mute the thread (https://github.com/notifications/unsubscribe-auth/AH1Db9d4qGMKf_EkTKc2lY0TPkJOf4PQks5q8JPigaJpZM4KscMK).

nguruprasanna commented 8 years ago

let me check with python3 command. I have python linked to python3 in my .bashrc

kengz commented 8 years ago

also, the shell process spawned from within nodejs does not inherit the env, so the settings in .bashrc may not carry over