๐ ZTeraDB Troubleshooting Guide
If you see errors like:
Connection failed
Invalid configuration
FilterCondition error
ModuleNotFoundError: No module named 'zteradb'
Could not connect to host
This guide will help you fix them quickly.
๐ 1. Configuration Errors
โ Error:โ
Missing or invalid client_key / access_key / secret_key
โ Fix:โ
Make sure your .env contains all required fields:
CLIENT_KEY=your-client-key
ACCESS_KEY=your-access-key
SECRET_KEY=your-secret-key
DATABASE_ID=your-database-id
ZTERADB_HOST=db1.zteradb.com
ZTERADB_PORT=7777
ZTERADB_ENV=dev
Load them correctly:
import os
os.getenv("CLIENT_KEY")
โ Error:โ
Invalid value for env
โ Allowed values:
dev
staging
qa
prod
Ensure you're passing:
env=ENVS("dev")
๐ 2. Connection Errors
โ Error:โ
Connection refused
โ Fix:โ
- Check host โ must be something like:
db1.zteradb.com - Check port โ usually:
7777 - Ensure Firewall / VPN / WiFi isn't blocking outbound TCP
- Make sure your cluster is up
โ Error:โ
Connection timeout
โ Fix:โ
Test reachability:
curl http://db1.zteradb.com:7777
If unreachable โ restart internet or check ZTeraDB dashboard.
โ Error:โ
ModuleNotFoundError: No module named 'zteradb'
โ Fix:
pip install zteradb
If using a virtual environment:
source venv/bin/activate
๐ฆ 3. Import / Class Errors
โ Error:โ
ImportError: cannot import name 'ZTeraDBConfig'
โ Fix: Make sure correct import syntax is used:
from zteradb.zteradb_config import ZTeraDBConfig
๐งฑ 4. Query Errors
โ Error:โ
Missing query type: select / insert / update / delete
โ Fix:
ZTeraDBQuery("user").select()
โ Error:โ
Fields required for INSERT or UPDATE
โ Fix:
query.insert().fields({"email": "test@test.com"})
๐ 5. FilterCondition Errors
โ Error:โ
Invalid parameters passed to ZTMUL
โ Fix: Always pass lists:
ZTMUL(["price", "quantity"])
โ Error:โ
Invalid filter: expected list of conditions
โ Fix:
ZTAND([condition1, condition2])
๐งช 7. Debugging Tips
โ Tip 1 โ Print Raw Queryโ
print(query.generate())
โ Tip 2 โ Try a Simple Queryโ
ZTeraDBQuery("user").select()
โ Tip 3 โ Re-check Keysโ
Most errors come from wrong client/access/secret key values.
๐ Still Not Working?
Share the exact error message โ I will fix it immediately.