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

Testing a package #105

Closed
facorazza opened this issue Jun 8, 2019 · 8 comments
Closed

Testing a package #105

facorazza opened this issue Jun 8, 2019 · 8 comments

Comments

@facorazza
Copy link
Contributor

Specs

  • Leon version: 1.0.0-beta.3
  • OS (or browser) version: Firefox
  • Node.js version: 10.16.0
  • Complete "npm run check" output: Hooray! Leon can run correctly
  • (if using Docker) Complete "npm run docker:check" output: nope
  • (optional) Leon package version:

Expected Behavior

I've written this package but leon is able to recognize only the first expression set even if I ask him something different that should match other expression sets. So I tried to momentarly remove the first expression set and see what would happen. This is the result, but it's not very informative to me.

Actual Behavior

.: NER :.

➡ Searching for entities...
(node:69002) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'entities' of undefined
    at Promise (/Users/federico/Dropbox/GitHub/leon/server/dist/core/ner.js:57:49)
    at new Promise (<anonymous>)
    at Ner.extractActionEntities (/Users/federico/Dropbox/GitHub/leon/server/dist/core/ner.js:37:12)
    at Nlu.process (/Users/federico/Dropbox/GitHub/leon/server/dist/core/nlu.js:159:37)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:69002) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

How Do We Reproduce?

You might need the package...

Extra (like a sample repo to reproduce the issue, etc.)

@facorazza facorazza added the bug Indicates an unexpected problem or unintended behavior. label Jun 8, 2019
@louistiti
Copy link
Member

Hello @Imperator26,

Thanks for opening that issue and for creating a new package if I understood correctly.

Could you please give more context? What's the package for? What are you doing exactly (commands, etc.) to get this error?

@facorazza
Copy link
Contributor Author

facorazza commented Jun 8, 2019

Hi @louistiti,
Yes I'm working on a simplier weather package myself. You can check it out at my fork

@louistiti
Copy link
Member

Peek 2019-06-09 08-27

Well done! I've tried your fork and it's working pretty well.

Now regarding your concern, could you please provide me the expressions file that is causing that error and also tell me what sentences are you giving to Leon?

@facorazza
Copy link
Contributor Author

facorazza commented Jun 9, 2019

@louistiti If you try to ask him "When is the sun going to rise in London?" it doesn't work. He answers like I asked "What's the weather like in London?". I tried npm run train expressionsmultiple times, but that did't work. So I tried to momentarely remove the expression "What's the weather like in", but I get the error above.

Quick link to expressions file.

@louistiti
Copy link
Member

louistiti commented Jun 9, 2019

Peek 2019-06-09 15-52

It looks good here 🤔

I'm on this commit.

Maybe try to git pull and reinstall the project, several changes have been made since your fork.

@facorazza
Copy link
Contributor Author

Peek 2019-06-09 15-52

It looks good here 🤔

I'm on this commit.

Maybe try to git pull and reinstall the project, several changes have been made since your fork.

Interesting... I'll try that

@facorazza
Copy link
Contributor Author

It works I'll make a PR

@facorazza
Copy link
Contributor Author

PR #108

@louistiti louistiti removed the bug Indicates an unexpected problem or unintended behavior. label Jun 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants