question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

requested_slot remains 'none' after restarting form

See original GitHub issue

Rasa version: rasa-core 0.13.8
rasa-core-sdk 0.13.1
rasa-nlu 0.14.6 Python version: 3.6 Operating system (windows, osx, …): Ubuntu 16.04 Issue: I am using checkpoints to loop over substories. Users fill a form with information about a single item, but they may want multiple items, so i want to ask users at the end of each item submission if they want to add another. Regardless, at the end of each item the information from those slots is concatenated and shoved somewhere for later use, and then all the slots of that form are manually set to None.

However, if i then try to fire up the form again it says the requested_slot is none and it fails. I can get around this by setting requested_slot to the first slot in my required slot mappings, but i was wondering if this is meant to be done automatically and i am not doing it properly?

Content of configuration file (config.yml):

language: "en"
pipeline:
- name: "nlp_spacy"
- name: "tokenizer_spacy"
- name: "intent_entity_featurizer_regex"
- name: "intent_featurizer_spacy"
- name: "ner_crf"
- name: "intent_featurizer_count_vectors"
- name: "intent_classifier_tensorflow_embedding"
  epochs: 600
- name: "ner_duckling_http"
  url:  "http://0.0.0.0:8000"
  dimensions: ["time", "number", "distance"]

Content of domain file (stories.md)

## greet1
* greet
  - utter_greet
  
## new_quote1
* greet
  - utter_greet
* quote
  - action_fillall
  - items_form
  - form{"name": "items_form"}
  - form{"name": null}
  - action_collect_items
  - utter_ask_add_item
> check_add_item


## add_item
> check_add_item
* affirm
  - items_form
  - form{"name": "items_form"}
  - form{"name": null}
  - action_collect_items
> check_add_item

## not_add_item
> check_add_item
* deny
  - utter_return_quote


## general_thanks
* thanks
  - utter_welcome
* goodbye
  - utter_goodbye
  - action_restart

## thanks_goodbye
* thanks_and_goodbye
  - utter_welcome
  - utter_goodbye
  - action_restart

action_collect_items action (please don’t judge me on my sloppy python!) Here the ‘test_slot’ is just a temporary dumping ground where i shove the concatenated info from all previous items.

class CollectItems(Action):
	def name(self):
		return "action_collect_items"

	def run(self, dispatcher, tracker, domain):
		current_slots = tracker.slots
		if current_slots['test_slot'] == None:
			test = ''
		else:
			test = current_slots['test_slot']

		item_slot_keys = ['dimensions', 'length', 'width', 'height', 'quantity', 'weight']
		item_slot_values = [ current_slots[slot] for slot in item_slot_keys ]
		test = test.join([str(i) for i in item_slot_values])
		test = test + ":            "
		result = [SlotSet('test_slot', test), SlotSet('requested_slot', 'dimensions')]
		for slot in item_slot_keys:
			result.append(SlotSet(slot, None))

		return result

Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
akeladcommented, Apr 26, 2019

Thanks for raising this issue, @Ghostvv will get back to you about it soon.

0reactions
Zylatiscommented, Apr 30, 2019

Ah okay I see, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should slots generally be reset to None after action is executed?
If I reset it though, the bot always forgets about the past immediately. Therefore, in followup actions the bot cannot act on any...
Read more >
Problem when filling slots with custom form (Failed to extract ...
This custom form must collect two required slots: city and type . The first one is collected from an entity of an intent....
Read more >
What is DDR4 Self-healing on Dell PowerEdge Servers with ...
With BIOS 2.1.x or later, the first recommended step is to reboot/restart (without moving DIMMs to a different slot).
Read more >
Domain XML format - Libvirt
All non-hotpluggable CPUs present at boot need to be grouped after vCPU 0. ... this element specifies the action to take when the...
Read more >
<input type="submit"> - HTML: HyperText Markup Language
Methods, None ... <input type="submit" value="Send Request" /> ... This, the default value, sends the form data as a string after URL ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found