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.

MappingPolicy throwing error

See original GitHub issue

Rasa version: rasa-core==0.14.0 rasa-core-sdk==0.13.1 rasa-nlu==0.15.0

Python version:

Python 3.6.5 :: Anaconda, Inc.

Operating system (windows, osx, …): OSX 10.13.6 Issue:

Some of my mappings cause MappingPolicy to throw an error. Haven’t been able to isolate the issue properly (this error happens for intents greeting, goodbye, availableFunctions, but not for getBalance, see yml files below):

Your input ->  what can you do                                                                                                                                                                              
Exception in thread Thread-39:
Traceback (most recent call last):
  File "/Users/44097208/anaconda3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/Users/44097208/anaconda3/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/44097208/Development/dtc_hssbot/venv/lib/python3.6/site-packages/rasa_core/channels/channel.py", line 324, in on_message_wrapper
    on_new_message(message)
  File "/Users/44097208/Development/dtc_hssbot/venv/lib/python3.6/site-packages/rasa_core/agent.py", line 322, in handle_message
    return processor.handle_message(message)
  File "/Users/44097208/Development/dtc_hssbot/venv/lib/python3.6/site-packages/rasa_core/processor.py", line 77, in handle_message
    self._predict_and_execute_next_action(message, tracker)
  File "/Users/44097208/Development/dtc_hssbot/venv/lib/python3.6/site-packages/rasa_core/processor.py", line 298, in _predict_and_execute_next_action
    action, policy, confidence = self.predict_next_action(tracker)
  File "/Users/44097208/Development/dtc_hssbot/venv/lib/python3.6/site-packages/rasa_core/processor.py", line 158, in predict_next_action
    probabilities, policy = self._get_next_action_probabilities(tracker)
  File "/Users/44097208/Development/dtc_hssbot/venv/lib/python3.6/site-packages/rasa_core/processor.py", line 471, in _get_next_action_probabilities
    tracker, self.domain)
  File "/Users/44097208/Development/dtc_hssbot/venv/lib/python3.6/site-packages/rasa_core/policies/ensemble.py", line 340, in probabilities_using_best_policy
    probabilities = p.predict_action_probabilities(tracker, domain)
  File "/Users/44097208/Development/dtc_hssbot/venv/lib/python3.6/site-packages/rasa_core/policies/mapping_policy.py", line 64, in predict_action_probabilities
    assert latest_action.name == action
AttributeError: 'ActionExecuted' object has no attribute 'name'

Content of configuration file (config.yml):

policies:
  - name: KerasPolicy
    epochs: 100
    max_history: 5
  - name: FallbackPolicy
    fallback_action_name: 'action_default_fallback'
  - name: MemoizationPolicy
    max_history: 5
  - name: FormPolicy
  - name: MappingPolicy

Content of domain file (domain.yml) (if used & relevant):

intents:
  - greeting: {triggers: utter_greet}
  - goodbye: {triggers: utter_goodbye}
  - availableFunctions: {triggers: action_availableFunctions}
  - affirm
  - deny
  - getBalance: {triggers: action_getBalance}

actions:
  - utter_greet
  - utter_goodbye
  - action_availableFunctions
  - action_getBalance

etc...

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
akeladcommented, Apr 26, 2019

@erohmensing are you opening a PR for this? please do so off of 0.14.x on the rasa_core repo

0reactions
erohmensingcommented, Apr 26, 2019

Okay great, thank you! As predicted, it successfully predicts utter_greet, it just gets messed up when it tries to predict the next action after. I’ve checked it out locally and get the same stuff, so your fix should work. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Couldn't create mapping policy for class named (Cocoa error ...
I am doing a manual/heavy migration in Core Data. I have data models i.e. myApp2.xcdatamodel and myApp3.xcdatamodel . myApp3 has one new table...
Read more >
Encountered an exception while running action ...
name: MemoizationPolicy; name: KerasPolicy; name: MappingPolicy ... And when I tried rasa interactive it throws the same error.
Read more >
AAD - Where can you view these outputs / errors?
AADB2C90289: We encountered an error connecting to the identity provider. ... Even using the built in sample throws exception when linking ...
Read more >
Problem in mapping existing schema in SunOne8 — oracle-tech
When i try to deploy the Jar, deployer is throwing the below error. Deploy action running. ... getJdbcTypeName(MappingPolicy.java:885)
Read more >
MapStruct - Throwing Exception - Tutorialspoint
MapStruct - Throwing Exception, Mapstruct mapper allows throwing specific exception. Consider a case of custom mapping method where we want to throw our ......
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