Rasa Train Failing - PermissionError: [WinError 5] Access is denied:

I have upgraded to RASA 2.1 on my local windows machine. when i give command [rasa init] it creates new model trains successfully and executes well. But when i give command [rasa train] afterwards it fails, even when i am not changing anything.

I get following error message. PermissionError: [WinError 5] Access is denied: ‘C:\Users\xxxxxx\AppData\Local\Temp\tmpg0guerf7\core\policy_1_TEDPolicy\ted_policy.tf_model.data-00000-of-00001’

I am not sure why rasa train works as part of rasa init but not explicitly. Before upgrade everything was working flawlessly. Please help.

Can you check which rasa & python version are being used at each step? If you installed rasa in a virtual environment, and used a new shell but didn’t re-activate it when you re-trained, it could be using a different interpreter.

Thank you, I have installed into venv. I have not opened any other command prompt if that is what you meant by shell. Can you help how to reactivate it?

Following are the details.

Rasa Version : 2.1.3 Rasa SDK Version : 2.1.2 Rasa X Version : None Python Version : 3.7.0 Operating System : Windows-10-10.0.17763-SP0

If you’re using a venv, you activate it with source <path to venv bin>/activate or something similar. If you clear out your model directory, can you retrain? Are you training with just rasa train?

Hi, did you solve this problem?

I’ve the same error using:

  • Windows 11
  • Rasa 3.6.0
  • Python: 3.9.13

The error shows also if open the shell as Administrator. How can I solve the problem?

I’m trying to execute the code of this Rasa tutorial:

Thank you


I think there is some problem using Rasa on Windows 11. When this error occurs to execute “rasa train” without errors I have:

  • to delete the Rasa cache: “.rasa/cache”
  • to delete the content of the directory “C:\Users\xxxxxx\AppData\Local\Temp\tmpxxxxx”

Only in this way the command “rasa train” ends without errors.