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.

Servor error in interactive mode

See original GitHub issue

Rasa Core version: Version: 0.12.0 Python version: Python 3.6.7 Operating system: windows10

Issue:

I cloned a chatbot from GitHub and wanted to run it. Yet, while using train_online.py I got a ValueError and an HTTPError:

(chaenv36) C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation>python train_online.py
...
Epoch 99/100
113/113 [==============================] - 0s 133us/step - loss: 1.0234 - acc: 0.6018
Epoch 100/100
113/113 [==============================] - 0s 133us/step - loss: 1.0202 - acc: 0.6195
INFO:rasa_core.policies.keras_policy:Done fitting keras policy model
INFO:rasa_core.training.interactive:Rasa Core server is up and running on http://localhost:5005
Bot loaded. Visualisation at http://localhost:5005/visualization.html.
Type a message and press enter (press 'Ctr-c' to exit).
Processed Story Blocks: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 22/22 [00:00<00:00, 628.60it/s, # trackers=1]
? Next user input (Ctr-c to abort):  Hey !
ERROR:rasa_core.server:Caught an exception while logging message.
Traceback (most recent call last):
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_core\server.py", line 437, in log_message
    tracker = agent.log_message(usermsg)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_core\agent.py", line 341, in log_message
    return processor.log_message(message)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_core\processor.py", line 129, in log_message
    self._handle_message_with_tracker(message, tracker)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_core\processor.py", line 269, in _handle_message_with_tracker
    parse_data = self._parse_message(message)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_core\processor.py", line 255, in _parse_message
    parse_data = self.interpreter.parse(message.text)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_core\interpreter.py", line 293, in parse
    return self.interpreter.parse(text)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_nlu\model.py", line 357, in parse
    component.process(message, **self.context)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_nlu\classifiers\sklearn_intent_classifier.py", line 180, in process
    intent_ids, probabilities = self.predict(X)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_nlu\classifiers\sklearn_intent_classifier.py", line 222, in predict
    pred_result = self.predict_prob(X)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_nlu\classifiers\sklearn_intent_classifier.py", line 210, in predict_prob
    return self.clf.predict_proba(X)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\sklearn\utils\metaestimators.py", line 115, in <lambda>
    out = lambda *args, **kwargs: self.fn(obj, *args, **kwargs)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\sklearn\model_selection\_search.py", line 484, in predict_proba
    return self.best_estimator_.predict_proba(X)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\sklearn\svm\base.py", line 594, in _predict_proba
    X = self._validate_for_predict(X)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\sklearn\svm\base.py", line 459, in _validate_for_predict
    (n_features, self.shape_fit_[1]))
ValueError: X.shape[1] = 300 should be equal to 384, the number of features at training time
ERROR:rasa_core.training.interactive:An exception occurred while recording messages.
Traceback (most recent call last):
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_core\training\interactive.py", line 1257, in record_messages
    _enter_user_message(sender_id, endpoint)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_core\training\interactive.py", line 1110, in _enter_user_message
    send_message(endpoint, sender_id, answers["message"])
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_core\training\interactive.py", line 119, in send_message
    return _response_as_json(r)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_core\training\interactive.py", line 92, in _response_as_json
    response.raise_for_status()
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\requests\models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:5005/conversations/default/messages

Googling the last error I read @tmbo answer here:

We have just recently added the NLU training data dumping feature to our master branch. Only if you run that version, the interactive learning will persist collected NLU training data. Because to correct these mistakes, you need to retrain your nlu model.

So I tried to retrain it but I had another error:

(chaenv36) C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation>python train_init.py
...
Processed Story Blocks: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 22/22 [00:00<00:00, 86.66it/s, # trackers=15]
Processed actions: 44it [00:00, 11002.11it/s, # examples=44]
2019-02-09 10:35:08.373081: I T:\src\github\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
_________________________________________________________________
Layer (type)                 Output Shape              Param #
=================================================================
masking (Masking)            (None, 5, 22)             0
_________________________________________________________________
lstm (LSTM)                  (None, 32)                7040
_________________________________________________________________
dense (Dense)                (None, 11)                363
_________________________________________________________________
activation (Activation)      (None, 11)                0
=================================================================
Total params: 7,403
Trainable params: 7,403
Non-trainable params: 0
_________________________________________________________________
INFO:rasa_core.policies.keras_policy:Fitting model with 121 total samples and a validation split of 0.1
Traceback (most recent call last):
  File "train_init.py", line 23, in <module>
    validation_split = 0.2)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_core\agent.py", line 525, in train
    **kwargs)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_core\policies\ensemble.py", line 67, in train
    policy.train(training_trackers, domain, **kwargs)
  File "C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\rasa_core\policies\keras_policy.py", line 177, in train
    **params)
TypeError: fit() got multiple values for keyword argument 'epochs'

So I found an answer from @akelad

The correct command that worked for me for online training with the restaurant bot is:Β  python -m rasa_core.train -s data/babi_stories.md -o models/dialogue/ -d restaurant_domain.yml --online

I tried this but it also asked me the config file so I provided it as well and got another error:

(chaenv36) C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation>python -m rasa_core.train -s data/data.md -o models/dialogue/ -d room_domain.yml -c config_spacy.json --online
C:\Users\antoi\Documents\Programming\Nathalie\7_2_2019\ChatbotRASA_Room-reservation\chaenv36\lib\site-packages\h5py\__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
usage: train.py [-h] {default,compare,interactive} ...
train.py: error: unrecognized arguments: --online

Content of domain file (if used & relevant):

slots:
  name_room:
    type: text
  day:
    type: text
  hour_start:
    type: text
  duration:
    type: text

intents:
 - greet
 - goodbye
 - book_room

entities:
 - name_room
 - day
 - hour_start
 - duration

templates:
  utter_greet:
  - text: "Hey ! How can I help?"
  - text: "Hi ! How can I help?"
  - text: "YAZZZZZZAAAAA ! ...  How can I help you ?"
  utter_goodbye:
  - text: "Bye :("
  - text: "Talk to you later"
  utter_ask_room:
    - 'In what room?'
  utter_ask_day:
    - 'What day?'
  utter_ask_hour_start:
    - 'What time do you want to start your meeting?'
  utter_ask_duration:
    - 'How long would you need ?'


actions:
 - utter_greet
 - utter_goodbye
 - utter_ask_room
 - utter_ask_day
 - utter_ask_hour_start
 - utter_ask_duration
 - action_room

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
akeladcommented, Feb 12, 2019

@EPedrotti can you take a look please?

0reactions
no-response[bot]commented, Apr 4, 2019

This issue has been automatically closed because there has been no response to our request for more information from the original author. Without this, we don’t have enough information to help you. Please comment below with the requested information if you still need help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

KB484435: Running the Intelligence Server in interactive ...
This article explains why the MSTRExex Error is experienced when running the Intelligence Server in interactive mode in MicroStrategy 2020.
Read more >
Upgrading the server in interactive mode (BigFix scenario) - IBM
To upgrade the server in interactive mode, start the installation of a newer version of License ... Otherwise, the upgrade might fail with...
Read more >
Non-Interactive ORDS CLI Commands Examples
This section provides some examples for non-interactive install/upgrade, and uninstall. ... Specify a PL/SQL gateway user and --gateway-mode proxied.
Read more >
Servor error in interactive mode - Rasa Open Source
I cloned an old chatbot I did from GitHub and wanted to run it. Yet, while using train_online.py I got a ValueError and...
Read more >
Documentation: 15: psql - PostgreSQL
the previous connection will be kept if psql is in interactive mode. ... Repeats the most recent server error message at maximum verbosity,Β ......
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