Environment variable ROBOCORP_HOME

Symptom

Robocorp tools warn about invalid characters in the user folder and guide the user to select a different folder.

Reason

Some Python libraries and tools cannot correctly handle spaces and special characters in the folder names, so we try to avoid those situations. By default, all Robocorp tools use user-specific folders to store the needed content. These folders are:

  • Windows: %LOCALAPPDATA%\robocorp
    • Which expands to: C:\Users\John Doé\AppData\Local\robocorp
  • Linux & macOS: ~/robocorp

It is rare to have special characters in the user's folder on Linux and Mac, but on Windows, it is becoming more common.

Solution

All Robocorp tools follow and use the environment variable ROBOCORP_HOME to control the storage path. UI tools like Visual Studio Code extensions, Automation Studio, and Assistant all have a detection logic that shows the warning and guides you to set a new path directly from the tools themselves. You need to set the environment variable for command line tools like RCC.

If you are hitting this problem, the simplest way is to set a user-specific environment variable according to the guide below, as this fixes the issue for all Robocorp tools in one go.

  1. From the Start menu, open Edit system environment variables > Environment Variables...
  2. Add a new variable under User variables for <your user name>
  3. Set Variable name: ROBOCORP_HOME and Variable value: <path to a folder> according to guides below:
    • The selected path cannot have spaces or special characters.
    • The selected path should contain something unique to your user so that your files do not get mixed with other users ROBOCORP_HOME
August 9, 2022