Frequently Asked Questions (FAQ)¶
Q: Why am I getting a "Failed to prepare environment" error when deploying my python agent to UiPath Cloud Platform?¶
Error Message¶
{
"Code": "Serverless.PythonCodedAgent.PrepareEnvironmentError",
"Title": "Failed to prepare environment",
"Detail": "An error occurred while installing the package dependencies. Please try again. If the error persists, please contact support.",
"Category": "System",
"Status": null
}
Visual Example¶
Example of the error as it appears in UiPath Cloud Platform
Description¶
This error might occur when deploying coded-agents to UiPath Cloud Platform, even though the same project might work correctly in your local environment. The issue is often related to how Python packages are discovered and distributed during the cloud deployment process.
Common Causes¶
- Multiple top-level packages or modules in your project structure
- Improper configuration or formatting in the pyproject.toml or requirements.txt files
Solution¶
1. Check Your Project Structure¶
- Ensure your Python files are organized under a non top-level directory (e.g., using the
src
layout) - Follow the recommended project structure:
project_root/
├── src/
│ └── your_package/
│ ├── __init__.py
│ └── your_modules.py
├── pyproject.toml
└── setup.cfg/setup.py
2. Configure Package Discovery¶
If you need to maintain your current project structure, you can configure custom package discovery in your pyproject.toml
:
3. Verify Dependencies¶
- Ensure all required dependencies are properly listed in your
requirements.txt
orpyproject.toml
Reference¶
For more detailed information about package discovery and configuration, refer to the official setuptools documentation.
Q: Why am I getting timeouts or "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed" errors?¶
The UiPath CLI automatically works with your corporate network setup, including proxy servers and security tools like ZScaler, by leveraging your system's native SSL certificate store.
Proxy Configuration¶
Configure these environment variables to route CLI traffic through your corporate proxy:
✓ Authentication successful.
✓ Authentication successful.
✓ Authentication successful.
Proxy Authentication¶
✓ Package published successfully!
✓ Package published successfully!
✓ Package published successfully!
Tip
For IT Administrators: Add these environment variables to your Group Policy or system configuration:
Warning
The CLI uses a local HTTP server for the authentication callback. You must exclude localhost from your proxy using NO_PROXY=localhost,127.0.0.1
or authentication will fail.
Troubleshooting¶
* Connected to proxy.company.com (192.168.1.100) port 8080
✓ Connection successful
# Test localhost exclusioncurl --proxy $HTTP_PROXY http://localhost:8080* Bypassing proxy for localhost
✓ Direct connection to localhost successful
SSL Certificates¶
The UiPath CLI automatically uses your system's certificate store (Windows Certificate Store, macOS Keychain, Linux ca-certificates). Corporate certificates installed via Group Policy or IT tools will be automatically recognized.
Troubleshooting SSL Issues¶
If you encounter SSL certificate errors:
- Disable SSL verification (for testing only):
✓ Authentication successful.
✓ Authentication successful.
✓ Authentication successful.
- Use custom certificate bundle (if needed):
✓ Package published successfully!
✓ Package published successfully!
✓ Package published successfully!
Note: This FAQ will be updated as new information becomes available. If you continue experiencing issues after following these solutions, please contact UiPath support.