-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
mathematical_evaluation adopter is not handling invalid equations like four plus xyz #171
Comments
this is my code
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what is eight plus x
Traceback (most recent call last):
File "chatbot.py", line 22, in
response = chatbot.get_response(inputtext)
File "/home/abubakar/.local/lib/python3.6/site-packages/chatterbot/chatterbot.py", line 139, in get_response
response = self.generate_response(input_statement, additional_response_selection_parameters)
File "/home/abubakar/.local/lib/python3.6/site-packages/chatterbot/chatterbot.py", line 173, in generate_response
if adapter.can_process(input_statement):
File "/home/abubakar/.local/lib/python3.6/site-packages/chatterbot/logic/mathematical_evaluation.py", line 33, in can_process
response = self.process(statement)
File "/home/abubakar/.local/lib/python3.6/site-packages/chatterbot/logic/mathematical_evaluation.py", line 59, in process
mathparse.parse(expression, language=self.language.ISO_639.upper())
File "/home/abubakar/.local/lib/python3.6/site-packages/mathparse/mathparse.py", line 279, in parse
return evaluate_postfix(postfix)
File "/home/abubakar/.local/lib/python3.6/site-packages/mathparse/mathparse.py", line 211, in evaluate_postfix
a = stack.pop()
IndexError: pop from empty list
The text was updated successfully, but these errors were encountered: