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.

ERROR:rasa_core.training.interactive:An exception occurred while recording messages.

See original GitHub issue

Rasa Core version: rasa-nlu ==0.14.1 rasa-coe == 0.13.0 rasa-core-sdk==0.12.1 Python version: 3.6.8(64bit)

Operating system (windows, osx, …):windows

Issue: I try to train the model online but everytime i get the following error

Chat History

 #    Bot                                                                       You
───────────────────────────────────────────────────────────────────────────────────────────
 1    action_listen
───────────────────────────────────────────────────────────────────────────────────────────
 2                                                                                     hey
                                                                        intent: greet 0.72
───────────────────────────────────────────────────────────────────────────────────────────
 3    utter_greet 1.00
      Hello! How can I help?
      utter_ask_category
      can you choose the category you are interested in?
      Buttons:
      1: Tag
      (/inform{"category":"Tag"})
      2: Market (inform{"category":"Market"})
      action_listen
───────────────────────────────────────────────────────────────────────────────────────────
 4                                                            /inform{"category":"Market"}
                                                                       intent: inform 1.00
───────────────────────────────────────────────────────────────────────────────────────────
 5    slot{"category": "Market"}


Current slots:
        category: Market, name: None

------
? What is the next action of the bot?  0.08 action_listen
Thanks! The bot will now run action_listen.

ERROR:rasa_core.training.interactive:An exception occurred while recording messages.
Traceback (most recent call last):
  File "C:\Users\swarnalathaa\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\interactive.py", line 1216, in record_messages
    finetune, sender_ids, plot_file)
  File "C:\Users\swarnalathaa\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\interactive.py", line 824, in _predict_till_next_listen
    _plot_trackers(sender_ids, plot_file, endpoint)
  File "C:\Users\swarnalathaa\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\interactive.py", line 1151, in _plot_trackers
    max_history=2)
  File "C:\Users\swarnalathaa\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\visualization.py", line 448, in visualize_neighborhood
    _merge_equivalent_nodes(graph, max_history)
  File "C:\Users\swarnalathaa\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\visualization.py", line 200, in _merge_equivalent_nodes
    _nodes_are_equivalent(graph, i, j, max_history)):
  File "C:\Users\swarnalathaa\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\visualization.py", line 145, in _nodes_are_equivalent
    _fingerprint_node(graph, node_b, max_history)))
  File "C:\Users\swarnalathaa\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\visualization.py", line 111, in _fingerprint_node
    for continuation in continuations}
  File "C:\Users\swarnalathaa\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\visualization.py", line 111, in <setcomp>
    for continuation in continuations}
TypeError: sequence item 1: expected str instance, dict found

Content of domain file (if used & relevant):

slots:
  category:
    type: text
  name:
    type: text

intents:
 - greet
 - goodbye
 - inform


entities:
  - category
  - name

templates: 
  utter_ask_category: 
    - 
      buttons: 
        - 
          payload: "/inform{\"category\":\"Tag\"}"
          title: Tag
        - 
          payload: "inform{\"category\":\"Market\"}"
          title: Market
      text: "can you choose the category you are interested in?"

  utter_dont_understand: 
    - "Sorry, I dont understand what you are asking for :("
  utter_goodbye: 
    - "Talk to you later."
    - "Bye bye :("
  utter_greet: 
    - "Hello! How can I help?"



actions:
 - utter_greet
 - utter_goodbye
 - utter_ask_category
 - utter_dont_understand
 - action_news

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:22 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
Griffin98commented, Mar 13, 2019

@Nexemics you are doing it wrongly.If you are using script then while calling run_interactive_learning pass skip_visualization=True like this : interactive.run_interactive_learning(agent,training_data_file,skip_visualization=True)

or through terminal you can do like this:

python -m rasa_core.train interactive -o models/dialogue -d domain.yml -c policy_config.yml -s data/stories.md --skip_visualization --nlu models/current/nlu --endpoints endpoints.yml

2reactions
Swarnalathaacommented, Mar 5, 2019

Hi @shanushawan ,

  1. If you are getting error something like the one mentioned above during interactive training then try to run your interactive training by disabling visualization. check this link https://rasa.com/docs/core/interactive_learning/

  2. Since I wanted to reset all slots after the action_news has been performed, I made a separate action in actions.py which will reset all the slots.

class Actionreset(Action):

def name(self):
    return 'action_reset'

def run(self, dispatcher, tracker, domain):
    return [AllSlotsReset()]

and in my stories I need to call this action after action_news to reset all slots. Hope this helps πŸ˜ƒ

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR:rasa_core.training.interactive:An exception occurred ...
ERROR:rasa_core.training.interactive:An exception occurred while recording messages. TypeError: sequence item 1: expected str…
Read more >
Custom graph component for sentiment analysis
2022-01-14 15:05:34 ERROR rasa.core.training.interactive - An exception occurred while recording messages. Traceback (most recent call last):.
Read more >
[asyncio.exceptions.TimeoutError] within rasa interactive and ...
TimeoutError 2022-03-01 13:39:08 ERROR rasa.core.training.interactive - An exception occurred while recording messages. Traceback (most recent call last):Β ...
Read more >
How To Fix Obs Studio An Encoder Error Occurred ... - YouTube
In This Video We Will See How To Fix Obs Studio An Encoder Error Occurred While Recording or Recording ErrorHere Are The Steps...
Read more >
An encoder error occurred while recording (easy and quick fix)
OBS Studio: An encoder error occurred while recording (easy and quick fix). 42K views 2 years ago. iSmart. iSmart. 30.7K subscribers.
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