AttributeError: 'NoneType' object has no attribute 'index' using RASA












0















i try to use RASA to build a sample bot, but i got ths error message,



Bot loaded. Type a message and press enter (use '/stop' to exit):
sad
Exception in thread Thread-2:
Traceback (most recent call last):
File "C:python36libthreading.py", line 916, in _bootstrap_inner
self.run()
File "C:python36libthreading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:python36libsite-packagesrasa_corechannelschannel.py", line 291, in on_message_wrapper
on_new_message(message)
File "C:python36libsite-packagesrasa_coreagent.py", line 316, in handle_message
return processor.handle_message(message)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 86, in handle_message
self._predict_and_execute_next_action(message, tracker)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 305, in _predict_and_execute_next_action
action, policy, confidence = self.predict_next_action(tracker)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 168, in predict_next_action
probabilities, policy = self._get_next_action_probabilities(tracker)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 478, in _get_next_action_probabilities
tracker, self.domain)
File "C:python36libsite-packagesrasa_corepoliciesensemble.py", line 288, in probabilities_using_best_policy
if (result.index(max_confidence) ==
AttributeError: 'NoneType' object has no attribute 'index'


i use :



PYTHON  3.6.0
RASA CORE 0.12.0
RASA NLU 0.13.0
TENSORFLOW 1.10.0
PROTOBUF 3.6.0


ho it possible to solve this ?
Thank you










share|improve this question

























  • This usually means you have tried to treat an object of NoneType as a dict or similar. Are you able to show enough of your code for us to see what is causing the error please? A minimal, complete, verifiable example will help us to give a useful answer.

    – Rob Bricheno
    Nov 14 '18 at 13:49











  • i try to follow this tutoriel rasa.com/docs/core/quickstart/…

    – user8337738
    Nov 14 '18 at 13:52
















0















i try to use RASA to build a sample bot, but i got ths error message,



Bot loaded. Type a message and press enter (use '/stop' to exit):
sad
Exception in thread Thread-2:
Traceback (most recent call last):
File "C:python36libthreading.py", line 916, in _bootstrap_inner
self.run()
File "C:python36libthreading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:python36libsite-packagesrasa_corechannelschannel.py", line 291, in on_message_wrapper
on_new_message(message)
File "C:python36libsite-packagesrasa_coreagent.py", line 316, in handle_message
return processor.handle_message(message)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 86, in handle_message
self._predict_and_execute_next_action(message, tracker)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 305, in _predict_and_execute_next_action
action, policy, confidence = self.predict_next_action(tracker)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 168, in predict_next_action
probabilities, policy = self._get_next_action_probabilities(tracker)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 478, in _get_next_action_probabilities
tracker, self.domain)
File "C:python36libsite-packagesrasa_corepoliciesensemble.py", line 288, in probabilities_using_best_policy
if (result.index(max_confidence) ==
AttributeError: 'NoneType' object has no attribute 'index'


i use :



PYTHON  3.6.0
RASA CORE 0.12.0
RASA NLU 0.13.0
TENSORFLOW 1.10.0
PROTOBUF 3.6.0


ho it possible to solve this ?
Thank you










share|improve this question

























  • This usually means you have tried to treat an object of NoneType as a dict or similar. Are you able to show enough of your code for us to see what is causing the error please? A minimal, complete, verifiable example will help us to give a useful answer.

    – Rob Bricheno
    Nov 14 '18 at 13:49











  • i try to follow this tutoriel rasa.com/docs/core/quickstart/…

    – user8337738
    Nov 14 '18 at 13:52














0












0








0








i try to use RASA to build a sample bot, but i got ths error message,



Bot loaded. Type a message and press enter (use '/stop' to exit):
sad
Exception in thread Thread-2:
Traceback (most recent call last):
File "C:python36libthreading.py", line 916, in _bootstrap_inner
self.run()
File "C:python36libthreading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:python36libsite-packagesrasa_corechannelschannel.py", line 291, in on_message_wrapper
on_new_message(message)
File "C:python36libsite-packagesrasa_coreagent.py", line 316, in handle_message
return processor.handle_message(message)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 86, in handle_message
self._predict_and_execute_next_action(message, tracker)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 305, in _predict_and_execute_next_action
action, policy, confidence = self.predict_next_action(tracker)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 168, in predict_next_action
probabilities, policy = self._get_next_action_probabilities(tracker)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 478, in _get_next_action_probabilities
tracker, self.domain)
File "C:python36libsite-packagesrasa_corepoliciesensemble.py", line 288, in probabilities_using_best_policy
if (result.index(max_confidence) ==
AttributeError: 'NoneType' object has no attribute 'index'


i use :



PYTHON  3.6.0
RASA CORE 0.12.0
RASA NLU 0.13.0
TENSORFLOW 1.10.0
PROTOBUF 3.6.0


ho it possible to solve this ?
Thank you










share|improve this question
















i try to use RASA to build a sample bot, but i got ths error message,



Bot loaded. Type a message and press enter (use '/stop' to exit):
sad
Exception in thread Thread-2:
Traceback (most recent call last):
File "C:python36libthreading.py", line 916, in _bootstrap_inner
self.run()
File "C:python36libthreading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:python36libsite-packagesrasa_corechannelschannel.py", line 291, in on_message_wrapper
on_new_message(message)
File "C:python36libsite-packagesrasa_coreagent.py", line 316, in handle_message
return processor.handle_message(message)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 86, in handle_message
self._predict_and_execute_next_action(message, tracker)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 305, in _predict_and_execute_next_action
action, policy, confidence = self.predict_next_action(tracker)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 168, in predict_next_action
probabilities, policy = self._get_next_action_probabilities(tracker)
File "C:python36libsite-packagesrasa_coreprocessor.py", line 478, in _get_next_action_probabilities
tracker, self.domain)
File "C:python36libsite-packagesrasa_corepoliciesensemble.py", line 288, in probabilities_using_best_policy
if (result.index(max_confidence) ==
AttributeError: 'NoneType' object has no attribute 'index'


i use :



PYTHON  3.6.0
RASA CORE 0.12.0
RASA NLU 0.13.0
TENSORFLOW 1.10.0
PROTOBUF 3.6.0


ho it possible to solve this ?
Thank you







python python-3.x rasa-core






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 27 '18 at 16:32









Tobias

535311




535311










asked Nov 14 '18 at 13:45







user8337738




















  • This usually means you have tried to treat an object of NoneType as a dict or similar. Are you able to show enough of your code for us to see what is causing the error please? A minimal, complete, verifiable example will help us to give a useful answer.

    – Rob Bricheno
    Nov 14 '18 at 13:49











  • i try to follow this tutoriel rasa.com/docs/core/quickstart/…

    – user8337738
    Nov 14 '18 at 13:52



















  • This usually means you have tried to treat an object of NoneType as a dict or similar. Are you able to show enough of your code for us to see what is causing the error please? A minimal, complete, verifiable example will help us to give a useful answer.

    – Rob Bricheno
    Nov 14 '18 at 13:49











  • i try to follow this tutoriel rasa.com/docs/core/quickstart/…

    – user8337738
    Nov 14 '18 at 13:52

















This usually means you have tried to treat an object of NoneType as a dict or similar. Are you able to show enough of your code for us to see what is causing the error please? A minimal, complete, verifiable example will help us to give a useful answer.

– Rob Bricheno
Nov 14 '18 at 13:49





This usually means you have tried to treat an object of NoneType as a dict or similar. Are you able to show enough of your code for us to see what is causing the error please? A minimal, complete, verifiable example will help us to give a useful answer.

– Rob Bricheno
Nov 14 '18 at 13:49













i try to follow this tutoriel rasa.com/docs/core/quickstart/…

– user8337738
Nov 14 '18 at 13:52





i try to follow this tutoriel rasa.com/docs/core/quickstart/…

– user8337738
Nov 14 '18 at 13:52












2 Answers
2






active

oldest

votes


















0














With rasa_core version 0.12 you have to provide a policy configuration for the training. You can e.g. a default template for that from Github.
E.g. save the following snippet in a file called default_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


Then train Rasa Core with:



python -m rasa_core.train 
-d <path to domain file>
-s <path to stories>
-c default_config.yml
-o models/dialogue


Then run the trained model with:



python -m rasa_core.run -d models/dialogue





share|improve this answer
























  • Thank you Tobias, that resolve my problem

    – user8337738
    Nov 15 '18 at 10:11











  • is that a way to show chat on browser instead of shell view ? afnay.com/images/akelad.PNG

    – user8337738
    Nov 15 '18 at 10:24











  • Sure. Checkout github.com/mrbot-ai/rasa-webchat and rasa.com/docs/core/connectors/#socketio-setup

    – Tobias
    Nov 15 '18 at 13:06



















0














It looks like you have not trained the dialogue model or Policies have not been created properly. Try training your dialogue module again with following command



python -m rasa_core.train -d domain.yml -s stories.md -o models/dialogue


It will be good if you can you show contents following directory:



./models/dialogue


It should look something like below.



enter image description here






share|improve this answer
























  • thank you for your reponse, i have three folders, domain.json, domain.yml and policy_metadata.json www142.lunapic.com/do-not-link-here-use-hosting-instead/…

    – user8337738
    Nov 14 '18 at 17:28











  • files* not folders, i can't edit my last comment, i don't knew why !

    – user8337738
    Nov 14 '18 at 17:42











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53301685%2fattributeerror-nonetype-object-has-no-attribute-index-using-rasa%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown
























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














With rasa_core version 0.12 you have to provide a policy configuration for the training. You can e.g. a default template for that from Github.
E.g. save the following snippet in a file called default_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


Then train Rasa Core with:



python -m rasa_core.train 
-d <path to domain file>
-s <path to stories>
-c default_config.yml
-o models/dialogue


Then run the trained model with:



python -m rasa_core.run -d models/dialogue





share|improve this answer
























  • Thank you Tobias, that resolve my problem

    – user8337738
    Nov 15 '18 at 10:11











  • is that a way to show chat on browser instead of shell view ? afnay.com/images/akelad.PNG

    – user8337738
    Nov 15 '18 at 10:24











  • Sure. Checkout github.com/mrbot-ai/rasa-webchat and rasa.com/docs/core/connectors/#socketio-setup

    – Tobias
    Nov 15 '18 at 13:06
















0














With rasa_core version 0.12 you have to provide a policy configuration for the training. You can e.g. a default template for that from Github.
E.g. save the following snippet in a file called default_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


Then train Rasa Core with:



python -m rasa_core.train 
-d <path to domain file>
-s <path to stories>
-c default_config.yml
-o models/dialogue


Then run the trained model with:



python -m rasa_core.run -d models/dialogue





share|improve this answer
























  • Thank you Tobias, that resolve my problem

    – user8337738
    Nov 15 '18 at 10:11











  • is that a way to show chat on browser instead of shell view ? afnay.com/images/akelad.PNG

    – user8337738
    Nov 15 '18 at 10:24











  • Sure. Checkout github.com/mrbot-ai/rasa-webchat and rasa.com/docs/core/connectors/#socketio-setup

    – Tobias
    Nov 15 '18 at 13:06














0












0








0







With rasa_core version 0.12 you have to provide a policy configuration for the training. You can e.g. a default template for that from Github.
E.g. save the following snippet in a file called default_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


Then train Rasa Core with:



python -m rasa_core.train 
-d <path to domain file>
-s <path to stories>
-c default_config.yml
-o models/dialogue


Then run the trained model with:



python -m rasa_core.run -d models/dialogue





share|improve this answer













With rasa_core version 0.12 you have to provide a policy configuration for the training. You can e.g. a default template for that from Github.
E.g. save the following snippet in a file called default_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


Then train Rasa Core with:



python -m rasa_core.train 
-d <path to domain file>
-s <path to stories>
-c default_config.yml
-o models/dialogue


Then run the trained model with:



python -m rasa_core.run -d models/dialogue






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 15 '18 at 0:18









TobiasTobias

535311




535311













  • Thank you Tobias, that resolve my problem

    – user8337738
    Nov 15 '18 at 10:11











  • is that a way to show chat on browser instead of shell view ? afnay.com/images/akelad.PNG

    – user8337738
    Nov 15 '18 at 10:24











  • Sure. Checkout github.com/mrbot-ai/rasa-webchat and rasa.com/docs/core/connectors/#socketio-setup

    – Tobias
    Nov 15 '18 at 13:06



















  • Thank you Tobias, that resolve my problem

    – user8337738
    Nov 15 '18 at 10:11











  • is that a way to show chat on browser instead of shell view ? afnay.com/images/akelad.PNG

    – user8337738
    Nov 15 '18 at 10:24











  • Sure. Checkout github.com/mrbot-ai/rasa-webchat and rasa.com/docs/core/connectors/#socketio-setup

    – Tobias
    Nov 15 '18 at 13:06

















Thank you Tobias, that resolve my problem

– user8337738
Nov 15 '18 at 10:11





Thank you Tobias, that resolve my problem

– user8337738
Nov 15 '18 at 10:11













is that a way to show chat on browser instead of shell view ? afnay.com/images/akelad.PNG

– user8337738
Nov 15 '18 at 10:24





is that a way to show chat on browser instead of shell view ? afnay.com/images/akelad.PNG

– user8337738
Nov 15 '18 at 10:24













Sure. Checkout github.com/mrbot-ai/rasa-webchat and rasa.com/docs/core/connectors/#socketio-setup

– Tobias
Nov 15 '18 at 13:06





Sure. Checkout github.com/mrbot-ai/rasa-webchat and rasa.com/docs/core/connectors/#socketio-setup

– Tobias
Nov 15 '18 at 13:06













0














It looks like you have not trained the dialogue model or Policies have not been created properly. Try training your dialogue module again with following command



python -m rasa_core.train -d domain.yml -s stories.md -o models/dialogue


It will be good if you can you show contents following directory:



./models/dialogue


It should look something like below.



enter image description here






share|improve this answer
























  • thank you for your reponse, i have three folders, domain.json, domain.yml and policy_metadata.json www142.lunapic.com/do-not-link-here-use-hosting-instead/…

    – user8337738
    Nov 14 '18 at 17:28











  • files* not folders, i can't edit my last comment, i don't knew why !

    – user8337738
    Nov 14 '18 at 17:42
















0














It looks like you have not trained the dialogue model or Policies have not been created properly. Try training your dialogue module again with following command



python -m rasa_core.train -d domain.yml -s stories.md -o models/dialogue


It will be good if you can you show contents following directory:



./models/dialogue


It should look something like below.



enter image description here






share|improve this answer
























  • thank you for your reponse, i have three folders, domain.json, domain.yml and policy_metadata.json www142.lunapic.com/do-not-link-here-use-hosting-instead/…

    – user8337738
    Nov 14 '18 at 17:28











  • files* not folders, i can't edit my last comment, i don't knew why !

    – user8337738
    Nov 14 '18 at 17:42














0












0








0







It looks like you have not trained the dialogue model or Policies have not been created properly. Try training your dialogue module again with following command



python -m rasa_core.train -d domain.yml -s stories.md -o models/dialogue


It will be good if you can you show contents following directory:



./models/dialogue


It should look something like below.



enter image description here






share|improve this answer













It looks like you have not trained the dialogue model or Policies have not been created properly. Try training your dialogue module again with following command



python -m rasa_core.train -d domain.yml -s stories.md -o models/dialogue


It will be good if you can you show contents following directory:



./models/dialogue


It should look something like below.



enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 14 '18 at 16:28









Karthik SunilKarthik Sunil

11117




11117













  • thank you for your reponse, i have three folders, domain.json, domain.yml and policy_metadata.json www142.lunapic.com/do-not-link-here-use-hosting-instead/…

    – user8337738
    Nov 14 '18 at 17:28











  • files* not folders, i can't edit my last comment, i don't knew why !

    – user8337738
    Nov 14 '18 at 17:42



















  • thank you for your reponse, i have three folders, domain.json, domain.yml and policy_metadata.json www142.lunapic.com/do-not-link-here-use-hosting-instead/…

    – user8337738
    Nov 14 '18 at 17:28











  • files* not folders, i can't edit my last comment, i don't knew why !

    – user8337738
    Nov 14 '18 at 17:42

















thank you for your reponse, i have three folders, domain.json, domain.yml and policy_metadata.json www142.lunapic.com/do-not-link-here-use-hosting-instead/…

– user8337738
Nov 14 '18 at 17:28





thank you for your reponse, i have three folders, domain.json, domain.yml and policy_metadata.json www142.lunapic.com/do-not-link-here-use-hosting-instead/…

– user8337738
Nov 14 '18 at 17:28













files* not folders, i can't edit my last comment, i don't knew why !

– user8337738
Nov 14 '18 at 17:42





files* not folders, i can't edit my last comment, i don't knew why !

– user8337738
Nov 14 '18 at 17:42


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53301685%2fattributeerror-nonetype-object-has-no-attribute-index-using-rasa%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Bressuire

Vorschmack

Quarantine