Installed and running Rasa giving error on windows (asyncio time out, blocks[:,0] has incompatible row dimensions)

Hi, I recently installed rasa on windows in virtual env. Now while i am trying to run Rasa Shell, its giving me following error:

(venv) C:\Users\pooja\rasa-2>rasa shell 2020-10-02 06:46:07 INFO root - Connecting to channel ‘cmdline’ which was specified by the ‘–connector’ argument. Any other channels will be ignored. To connect to all given channels, omit the ‘–connector’ argument. 2020-10-02 06:46:07 INFO root - Starting Rasa server on http://localhost:5005 2020-10-02 06:46:17 WARNING rasa.shared.utils.validation - Training data file C:\Users\pooja\AppData\Local\Temp\tmp83k7d2rp\core\domain.yml doesn’t have a ‘version’ key. Rasa Open Source will read the file as a version ‘2.0’ file. See Introduction to Rasa Open Source | Rasa Open Source Documentation. 2020-10-02 06:46:19 INFO root - Rasa server is up and running. Bot loaded. Type a message and press enter (use ‘/stop’ to exit): Your input -> hi 2020-10-02 06:47:20 ERROR asyncio - Task exception was never retrieved future: <Task finished name=‘Task-2’ coro=<configure_app..run_cmdline_io() done, defined at c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\run.py:132> exception=TimeoutError()> Traceback (most recent call last): File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\run.py”, line 136, in run_cmdline_io await console.record_messages( File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\channels\console.py”, line 182, in record_messages async for response in bot_responses: File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\channels\console.py”, line 137, in send_message_receive_stream async for line in resp.content: File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\aiohttp\streams.py”, line 39, in anext rv = await self.read_func() File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\aiohttp\streams.py”, line 328, in readline await self._wait(‘readline’) File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\aiohttp\streams.py”, line 296, in _wait await waiter File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\aiohttp\helpers.py”, line 596, in exit raise asyncio.TimeoutError from None asyncio.exceptions.TimeoutError 2020-10-02 06:47:25 ERROR asyncio - Task exception was never retrieved future: <Task finished name=‘Task-12’ coro=<RestInput.on_message_wrapper() done, defined at c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\channels\rest.py:33> exception=ValueError(‘blocks[:,0] has incompatible row dimensions. Got blocks[1,0].shape[1] == 19, expected 20.’)> Traceback (most recent call last): File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\channels\rest.py”, line 47, in on_message_wrapper await on_new_message(message) File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\channels\channel.py”, line 84, in handler await app.agent.handle_message(*args, **kwargs) File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\agent.py”, line 518, in handle_message return await processor.handle_message(message) File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\processor.py”, line 97, in handle_message await self._predict_and_execute_next_action(message.output_channel, tracker) File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\processor.py”, line 562, in _predict_and_execute_next_action action, policy, confidence = self.predict_next_action(tracker) File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\processor.py”, line 284, in predict_next_action action_confidences, policy = self._get_next_action_probabilities(tracker) File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\processor.py”, line 828, in _get_next_action_probabilities return self.policy_ensemble.probabilities_using_best_policy( File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\policies\ensemble.py”, line 698, in probabilities_using_best_policy probabilities, policy_name = self.best_policy_prediction( File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\policies\ensemble.py”, line 585, in best_policy_prediction predictions = { File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\policies\ensemble.py”, line 586, in f"policy{i}{type§.name}": self._get_prediction( File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\policies\ensemble.py”, line 619, in _get_prediction probabilities = policy.predict_action_probabilities( File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\policies\ted_policy.py”, line 387, in predict_action_probabilities model_data = self._create_model_data(tracker_state_features) File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\core\policies\ted_policy.py”, line 303, in _create_model_data attribute_data, _ = convert_to_data_format( File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\utils\tensorflow\model_data_utils.py”, line 139, in convert_to_data_format attribute_data[attribute] = _features_for_attribute( File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\utils\tensorflow\model_data_utils.py”, line 193, in _features_for_attribute sparse_features[key] = [scipy.sparse.vstack(value) for value in values] File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\rasa\utils\tensorflow\model_data_utils.py”, line 193, in sparse_features[key] = [scipy.sparse.vstack(value) for value in values] File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\scipy\sparse\construct.py”, line 499, in vstack return bmat([[b] for b in blocks], format=format, dtype=dtype) File “c:\users\pooja\appdata\local\programs\python\python38\lib\site-packages\scipy\sparse\construct.py”, line 596, in bmat raise ValueError(msg) ValueError: blocks[:,0] has incompatible row dimensions. Got blocks[1,0].shape[1] == 19, expected 20.

I tried uninstalling and installing again. Why is blocks dimensions issue here and how to get it resolved. Please help.

Thanks and Regards Pooja

what version of python do you use?? in my case rasa doesn’t work with 3.8 so I switch to 3.7

Ohh Ok. i am using windows 10 and running python on conda so what are the step to degrade python version to specific version number?

I am using python 3.7.4. Do i need to degrade to 3.7.0?

I think that version is fine but try to make the downgrade anyway, and your’re trying to run the simplest example of rasa??? with:

rasa init --no-prompt

1 Like