Skip to main content

๐Ÿ›  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.