CLI Troubleshooting
Common issues and solutions when using OptixLog CLI.
Installation Issues
Command Not Found
Symptoms:
$ optixlog --help
zsh: command not found: optixlogSolutions:
-
Check if installed:
npm list -g optixlog-cli -
Re-link (if development install):
cd /path/to/optixlog-cli npm link -
Check PATH:
echo $PATH # Linux/macOS echo %PATH% # Windows -
Install globally:
npm install -g optixlog-cli
Permission Denied
Symptoms:
$ optixlog --version
Permission deniedSolutions:
-
Make executable:
chmod +x optixlog -
Use sudo (if needed):
sudo chmod +x /usr/local/bin/optixlog -
Check file permissions:
ls -l $(which optixlog)
Configuration Issues
Config File Not Found
Symptoms:
$ optixlog config
No configuration foundSolutions:
-
Initialize config:
optixlog init --project "MyProject" --api-key "proj_xxx" -
Check config location:
# Local config ls -la .optixlog.json # Global config ls -la ~/.optixlog.json -
Create manually:
{ "api_key": "proj_your_key", "api_url": "https://backend.optixlog.com", "project": "MyProject" }
API Key Not Working
Symptoms:
$ optixlog runs
✗ No API key configuredSolutions:
-
Set API key:
optixlog config set api_key "proj_YOUR_KEY" -
Check config:
optixlog config get api_key -
Verify key format:
# Should start with "proj_" optixlog config get api_key | grep "^proj_" -
Use environment variable:
export OPTIX_API_KEY="proj_your_key"
SDK Issues
SDK Not Found
Symptoms:
$ optixlog add-logging script.py
⚠ OptixLog SDK not found in Python environmentSolutions:
-
Check SDK:
optixlog check-sdk -
Install SDK:
optixlog install-sdk -
Manual install:
pip install http://optixlog.com/optixlog-0.0.4-py3-none-any.whl -
Check Python:
python --version which python
Wrong Python Environment
Symptoms: SDK installed but CLI can’t find it
Solutions:
-
Check which Python:
which python python --version -
Use specific Python:
/path/to/python -m pip install http://optixlog.com/optixlog-0.0.4-py3-none-any.whl -
Virtual environment:
source venv/bin/activate # Linux/macOS venv\Scripts\activate # Windows pip install http://optixlog.com/optixlog-0.0.4-py3-none-any.whl
Transformation Issues
File Not Found
Symptoms:
$ optixlog add-logging script.py
✗ File not found: script.pySolutions:
-
Check file exists:
ls -la script.py -
Use absolute path:
optixlog add-logging /full/path/to/script.py -
Check file extension:
# Only .py and .ipynb supported optixlog add-logging script.py optixlog add-logging notebook.ipynb
Transformation Failed
Symptoms:
$ optixlog add-logging script.py
✗ Transformation failedSolutions:
-
Check file syntax:
python -m py_compile script.py -
Try smart mode:
optixlog add-logging script.py --smart -
Check backend connection:
# Smart mode doesn't need backend optixlog add-logging script.py --smart -
Check file encoding:
file script.py # Should be UTF-8
Backup Not Created
Symptoms: No backup file after transformation
Solutions:
-
Check if backup exists:
ls -la *_backup.py -
Backup is created by default (unless
--no-backupused) -
Restore from backup:
cp script_backup.py script.py
Platform-Specific Issues
macOS Security
Symptoms: Binary blocked by Gatekeeper
Solutions:
-
Allow in System Preferences:
- System Preferences → Security & Privacy
- Click “Open Anyway”
-
Remove quarantine:
xattr -d com.apple.quarantine optixlog
Windows Path Issues
Symptoms: Path not found errors
Solutions:
-
Use forward slashes or double backslashes:
optixlog add-logging C:/path/to/script.py # or optixlog add-logging C:\\path\\to\\script.py -
Check path length (Windows has 260 char limit)
-
Use relative paths:
cd C:\path\to optixlog add-logging script.py
Linux Permission Issues
Symptoms: Permission denied errors
Solutions:
-
Check file permissions:
ls -l script.py chmod +r script.py # Make readable -
Check directory permissions:
ls -ld . chmod +w . # Make writable (for backup)
Network Issues
Backend Connection Failed
Symptoms:
$ optixlog runs
✗ Failed to fetch runs
Cannot connect to serverSolutions:
-
Check internet connection:
ping backend.optixlog.com -
Check API URL:
optixlog config get api_url -
Use smart mode (doesn’t need backend):
optixlog add-logging script.py --smart -
Check firewall/proxy:
- Ensure port 443 (HTTPS) is open
- Configure proxy if needed
Common Error Messages
”Invalid API key”
Cause: API key is incorrect or expired
Solutions:
- Get new key from https://optixlog.com
- Update config:
optixlog config set api_key "proj_NEW_KEY" - Verify key format (should start with
proj_)
“Project not found”
Cause: Project doesn’t exist
Solutions:
- Use
create_project_if_not_exists=Truein code - Create project via web UI
- List projects:
optixlog runs(shows available projects)
“SDK installation failed”
Cause: pip install failed
Solutions:
- Check Python version:
python --version(need 3.8+) - Update pip:
pip install --upgrade pip - Install manually:
pip install http://optixlog.com/optixlog-0.0.4-py3-none-any.whl - Check pip permissions
Getting Help
If you encounter an issue not covered here:
-
Check CLI version:
optixlog --version -
Check SDK version:
optixlog check-sdk -
Update CLI:
npm install -g optixlog-cli@latest -
Update SDK:
optixlog install-sdk # or pip install --upgrade optixlog -
Report the issue with:
- CLI version
- SDK version
- Python version
- Node.js version
- Error message
- Steps to reproduce