Recognizers-Text icon indicating copy to clipboard operation
Recognizers-Text copied to clipboard

[* DateTimeV2] Time inputs between 00:00 to 00:59 give invalid resolution

Open Kevv-J opened this issue 3 years ago • 3 comments

Describe the bug forwarded from BotBuilder python SDK , giving time input between 00:00 to 00:59 to recognize_datetime() method gives invalid response that leads to DateTimePrompt giving TypeError: 'NoneType' object is not subscriptable.

To Reproduce Steps to reproduce the behavior:

  1. Create a Dialog with a DateTimePrompt() in BotBuilder SDK.
  2. When Prompted for input on chat send Input between 00:00 to 00:59
  3. See error on python console

Expected behavior It should ideally give 12:00 AM as a valid result for 00:00 as input or at least return incorrect result so user is prompted with retry_message.

Sample input/output 00:00 / Result object with resolution = None 00:59 / Result object with resolution = None 00:30 / Result object with resolution = None

Platform (please complete the following information):

  • Platform: Python
  • Environment: BotBuilder Python SDK = 4.13.0 and 4.14.2
  • Version of package recognizers-text==1.0.2a2

Additional context It looks like on_recognize() method inside DateTimePrompt gets a result from recognize_datetime() method. The on_recognize() method expects to get results[0].resolution["values"] but the resolution attribute inside result received from recognize_datetime() is None for the given inputs.

Kevv-J avatar Jul 26 '22 06:07 Kevv-J

Hi @tellarin, any update on this issue? It seems to still be there in the latest version.

Kevv-J avatar Nov 08 '24 06:11 Kevv-J

@MichaelMWW, could you take a quick look?

tellarin avatar Nov 08 '24 12:11 tellarin

@MichaelMWW, could you take a quick look?

The issue is fixed on master branch latest code but not released to PyPI yet, we will follow on it.

MichaelMWW avatar Nov 14 '24 01:11 MichaelMWW