Troubleshooting
Quick solutions to common issues.
API Key Issues
"Invalid API key" or "Authentication failed"
Check your API key is set correctly:
import os
print(os.getenv("HEAPTREE_API_KEY"))Verify in your dashboard at https://www.heaptree.com/dashboard.
Node Issues
"Quota exceeded" or cannot create nodes
Your account may have reached usage limits. Reduce concurrent nodes or try again later. If a node is no longer needed, terminate it with terminate_nodes([node_id]).
Node not responding
VMs take 30–60 seconds to start. Wait briefly after creation before sending commands.
File Issues
Upload failing
Check file exists:
import os
os.path.exists("./my_file.txt") # Should return TrueDownload failing
Verify file exists on the node:
result = client.run_command(node_id, "ls -la /home/ubuntu/")
print(result.output)Command Execution Issues
Command failed with non-zero exit
Check details:
result = client.run_command(node_id, "your-command")
print(f"Exit code: {result.exit_code}")
print(f"Error: {result.error}")Missing dependencies for code execution
Install packages first:
client.run_command(node_id, "pip3 install requests pandas")Connectivity Issues
Timeouts or slow responses
Check internet connectivity and try again. VMs may be starting up — wait 30–60 seconds.
Still Having Issues?
Run a basic validation:
from heaptree import Heaptree
import os
client = Heaptree(api_key=os.getenv("HEAPTREE_API_KEY"))
# Test node creation
try:
result = client.create_node(lifetime_seconds=300)
print(f"✅ Node created: {result.node_id}")
client.terminate(result.node_id)
except Exception as e:
print(f"❌ Error: {e}")Get Help
Need help? Email heatpreehq@gmail.com