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

[BUG} - incomplete session after using dialogview #431

Open
LazzaAU opened this issue Apr 5, 2021 · 2 comments
Open

[BUG} - incomplete session after using dialogview #431

LazzaAU opened this issue Apr 5, 2021 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@LazzaAU
Copy link
Contributor

LazzaAU commented Apr 5, 2021

ISSUE

When using for example "reminder" skill via the webInterface the exisiting session gets replaced with userRandomeAnswer session when trying to add a message.

TO REPLICATE

In dialog View

  • You type ... add a timer for 1 minute
  • Alice asks you " what message would you like to call this timer"
  • You type .... test message (or what ever)
  • the following error will be observed
Traceback (most recent call last):
  File "/home/pi/ProjectAlice/core/base/SkillManager.py", line 245, in dispatchMessage
    consumed = skillInstance.onMessageDispatch(session)
  File "/home/pi/ProjectAlice/core/base/model/AliceSkill.py", line 463, in onMessageDispatch
    ret = function(session=session)
  File "/home/pi/ProjectAlice/skills/Reminder/Reminder.py", line 262, in processTheSpecifiedTime
    self.processAndStoreReminder(session, secs)
  File "/home/pi/ProjectAlice/skills/Reminder/Reminder.py", line 279, in processAndStoreReminder
    timeStampForDb = self.createEpochTimeStamp(secs)
  File "/home/pi/ProjectAlice/skills/Reminder/Reminder.py", line 363, in createEpochTimeStamp
    timeStampForDatabase = datetime.now() + timedelta(seconds=seconds)
TypeError: unsupported type for timedelta seconds component: str

NOTE

The skill works as expected when using "voice" commands. This only occurs if using dialog View

STEPS TAKEN ALREADY
I've traced it back as far as i can but it appears the initial session with the timer information is replaced with the userRandomAnswer session (rather than appended to it) prior to File "/home/pi/ProjectAlice/core/base/SkillManager.py", line 245, in dispatchMessage consumed = skillInstance.onMessageDispatch(session) which i feel starts getting into _handle_on_message or further which i'm lost at that point.

LOGS

https://paste.ubuntu.com/p/ysD6vN6rd3/

@LazzaAU LazzaAU added the bug Something isn't working label Apr 7, 2021
@LazzaAU LazzaAU added this to the 1.0.0-rc milestone Apr 7, 2021
@Psychokiller1888
Copy link
Member

Nope, that's because the seconds variable is of type str when coming from the interface. Add a cast to int for those cases

@philipp2310
Copy link
Member

Adding a cast won't be enough - the variable is an empty string in that case - the seconds value is not existing anymore (either lost between the api calls or was never saved)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants