Key Concepts

Troubleshooting

Introduction

You might occassionally receive an error indicating that something went wrong. We try to provide accurate error descriptions in the CLI, but in some cases, those might not be enough. This page lists common errors with their possible cause and a way to fix them. In case you still need help after that this page also contains instructions on how to report issues to our engineers in a way that makes it easy for us to help you with your issue.

Common Errors

The following table describes errors you may see when using the CLI:

Error MessagePossible Cause and Fix
No such command '<name>'

No such option: <option>
The command you tried to run does not exist or it doesn't support the option you provided. If the documentation says it is available you are probably using an outdated version of the CLI. Run pip install --upgrade lean to update to the latest version.
Invalid credentials, please log in using `lean login`
You are trying to use a command which communicates with the QuantConnect API and you haven't authenticated yourself yet. Run lean login to log in with your API credentials.
Please make sure Docker is installed and running
You are trying to use a command which needs to run the LEAN engine locally, which always happens in a Docker container. Make sure Docker is running if you installed it already, or visit Install Docker if you haven't.
Your venv probably has a non standard docker path or no docker access. Uninstall and reinstall docker.
This command requires a Lean configuration file, run `lean init` in an empty directory to create one, or specify the file to use with --lean-config
The command you are trying to run requires a Lean configuration file. The CLI automatically tries to find this file by recursively looking in the current directory and all of the parent directories for a lean.json file. This error is shown if no such file can be found. It can be fixed by running the command in your organization workspace directory (which generates the lean.json file), or by specifying the path to the lean.json file with the --lean-config option.
We couldn't find you account in the given organization, ORG: <32-char-hash>
The organization Id found in the lean.json is incorrect. You need to re-install Lean CLI running lean init in an empty directory.
Invalid value for 'PROJECT': Path '<path>' does not exist.
You are trying to run an action on a project but specified an invalid project path. Make sure you are running the command from your organization workspace directory and make sure ./<path> points to an existing directory.
'<path>' is not a valid path
You provided a path that is not valid for your operating system. This error is most likely to appear on Windows, where the following characters are not allowed in path components: <, >, :, ", |, ?, and *. On top of those characters the following names are not allowed (case-insensitive): CON, PRN, AUX, NUL, COM1 until COM9, and LPT1 until LPT9. Last but not least, path components cannot start or end with a space or end with a period on Windows.
invalid mount config for type "bind": bind source path does not exist: / var / folders / <path> / config.json

Mounts denied: The path / Users / <path> / data is not shared from the host and is not known to Docker
Your Mac's Docker file sharing settings do not permit binding one or more directories that we need to share with the container. Go to Docker's Settings > Resources > File Sharing and add / private / var / folders and either / Users to share your entire / Users directory, or / Users / <path> where <path> is the path to your QuantConnect directory, which should have a data child directory, and child directories for your individual projects.
Docker wants access to <path>
You are running Docker on Windows using the legacy Hyper-V backend and haven't configured file sharing correctly. You need to enable file sharing for your temporary directories and for your organization workspace directory. To do so, open your Docker settings, go to Resources > File Sharing and add C: / Users / <username> / AppData / Local / Temp and your organization workspace directory to the list. Click Apply & Restart after making the required changes.
Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
Your Docker installation has pulled the incorrect platform version of the LEAN Docker image. Open your terminal. Run docker rmi quantconnect/lean to remove the quantconnect/lean image and then run docker pull quantconnect/lean --platform=linux/amd64.

Report Issues

If with the information on this page and the error message shown by the CLI you're still unable to solve your issues you are welcome to contact our engineers by opening an issue in the QuantConnect/lean-cli repository on GitHub. Before doing so, please run the command that's giving issues with the --verbose flag and copy and paste the output into the issue (feel free to mask sensitive information). The --verbose flag enables debug messages to be printed, which makes it easier for us to help you.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: