AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Eliminating the Erratically Errant Error!
 
 

One thing that totally drives me bonkers is when I make some changes and save an .rs file, I then Run my rivescript.bat file (in a Command Prompt window) for testing.

The window opens and displays a Warning: Unrecognized command “I” at C:/Perl64/site/lib/RiveScript/demo/aimlW.rs line 17489.

When I get my editor and go to the file and to that line, I see no letter causing the error. There’s not even an “I” in the adjacent three lines!

Usually the error indicates that a Capital “I” in this case might have been inadvertently used in the Target line “+”
All other text in the subsequent response lines “-” can be mixed case, no problems.

I searched through countless lines of code and could find no such error of a Capital “I” and not even in the line specified by the startup error message.

I’ve tried different editors and they’ve reported the same “non-error” as did my original editor.

I was hoping a refresh or restart might help similar to clearing the cache memory but this has gotten ridiculous. The program will still allow me to continue without error but it is frustrating to deal with knowing something isn’t right.

Appreciate any helpful advice or assistance.

Thank you for playing
- Art -

 

 
  [ # 1 ]

Can you paste the section of your aimlW.rs file around that line?

The text “Unrecognized command” only appears in the source codes in one place: at the bottom of the giant if/elseif/else block of the parser where it handles the various commands (the first non-space characters on each line). Example of where this happens in the Python version: https://github.com/aichaos/rivescript-python/blob/fff60394d34c2b6523ba4a23ee18bad168944011/rivescript/parser.py#L500—The Java and Perl versions do similar things (the Go and JS versions word this error slightly differently)

Make sure your text editor doesn’t wrap lines. If it’s wrapping lines it might not appear to you that a line begins with the letter “I” but RiveScript sees that one does.

If you enable debug mode, you’ll get a lot of verbose output but if you direct the output to a file and search it for “Unrecognized command” you should see the debug lines leading up to it, one of which will say the actual line of text it was looking at before the error came up.

 

 
  [ # 2 ]

If it’s wrapping lines it might not appear to you that a line begins with the letter “I” but RiveScript sees that one does.

And that is exactly what happened. I noticed it as I was doing a cut & paste of the offending word, to help make a search easier to pinpoint. I saw that the word wasn’t being found so I did a test on a different word and noticed the problem that the wrapping line issue caused.

It is now back in good graces and my bot is not performing as it should.

Thanks Noah, for your ‘spot on’ solution!

If only it could learn and remember! But that’s another story, I’m sure.

 

 
  login or register to react