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

Bug causing .optionally regex to not execute, but it works with .required. IntentBuilder #1241

Open
InconsolableCellist opened this Issue Nov 21, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@InconsolableCellist
Contributor

InconsolableCellist commented Nov 21, 2017

I've observed that when doing a relatively simple regex with the IntentBuilder, the regex doesn't match when I include it with .optionally, but it works with .required.

This is most easily demonstrated with this example code: https://github.com/InconsolableCellist/test-skill/tree/optionally_bug

Steps to reproduce:

  1. Clone repo into mycroft skills directory; make sure you're on the optionally_bug branch
  2. Make sure mycroft loads it
  3. Note line 26 init.py
  4. Enter the following utterance to mycroft's debug console: test a by artist
  5. Change line init.py:26 to use "optionally" instead of "required"
  6. Enter test a by artist again

Expected behavior
The skill prints an INFO message: "Artist found! artist" on both steps 4 AND 6

Observed behavior
The INFO message is only printed on step 4, not on step 6, indicating that the regex doesn't seem to match when you build the intent by optionally including the regex rather than requiring it.

@MatthewScholefield

This comment has been minimized.

Show comment
Hide comment
@MatthewScholefield

MatthewScholefield Dec 14, 2017

Member

Would you mind creating this issue on the Adapt issue page instead? Also, it sounds similar, but the opposite to this issue.

Member

MatthewScholefield commented Dec 14, 2017

Would you mind creating this issue on the Adapt issue page instead? Also, it sounds similar, but the opposite to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment