Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example Script Bug #36

Closed
MrPeker opened this issue Sep 13, 2018 · 2 comments
Closed

Example Script Bug #36

MrPeker opened this issue Sep 13, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@MrPeker
Copy link

MrPeker commented Sep 13, 2018

When I try Example Script, getting these error..

mrpeker@MrPeker-MacBook-Air  ~/Desktop/nlp.js-master/examples/console-bot  node index.js  1 ↵  3354  02:08:15
Say something!
hello
/Users/mrpeker/Desktop/nlp.js-master/examples/console-bot/index.js:51
if (result.sentiment.score !== 0) {
^

TypeError: Cannot read property 'score' of undefined
at Interface.rl.on (/Users/mrpeker/Desktop/nlp.js-master/examples/console-bot/index.js:51:26)
at Interface.emit (events.js:180:13)
at Interface._onLine (readline.js:285:10)
at Interface._normalWrite (readline.js:433:12)
at ReadStream.ondata (readline.js:144:10)
at ReadStream.emit (events.js:180:13)
at addChunk (_stream_readable.js:274:12)
at readableAddChunk (_stream_readable.js:261:11)
at ReadStream.Readable.push (_stream_readable.js:218:10)
at TTY.onread (net.js:581:20)

@jesus-seijas-sp
Copy link
Contributor

Hello! Good catch! The problem is that process was sync, and we made it async to allow use duckling.
I already pushed the updated code, to understand the change: 9306c3f

@jesus-seijas-sp jesus-seijas-sp added the bug Something isn't working label Sep 14, 2018
@jesus-seijas-sp
Copy link
Contributor

Solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants