This guide covers common issues you may encounter when using the Kubiya SDK and their solutions.
Authentication Issues
Invalid API Key
Problem: Getting authentication errors even with correct API key. Symptoms:- Verify the API key is correct and not expired
- Check the key hasn’t been revoked in the dashboard
- Ensure no extra whitespace in the key value
- Verify you’re using the correct organization’s key
Environment Variable Not Set
Problem: API key environment variable not being read. Solutions:- Verify environment variable name is exactly
KUBIYA_API_KEY - Restart your terminal/IDE after setting the variable
- Use
.envfile withpython-dotenv:
Connection Issues
Connection Timeout
Problem: Requests timing out. Symptoms:- Increase timeout for long-running operations:
- Reduce complexity of operations:
Connection Refused
Problem: Unable to connect to Control Plane API. Solutions:- Check your network connectivity
- Verify firewall settings allow HTTPS to
control-plane.kubiya.ai - Check if you’re behind a proxy:
Data Issues
Empty Results
Problem: Search or recall operations return no results. Solutions:- Verify data exists in the dataset:
- Wait for data processing to complete:
- Broaden your search query:
Low Relevance Scores
Problem: Semantic search returns results with low similarity scores. Solutions:- Filter results by minimum score:
- Use intelligent search instead for complex queries:
Ingestion Issues
Duplicate Node Errors
Problem: Ingestion fails with duplicate node errors. Solution: Use appropriate duplicate handling:Batch Import Failures
Problem: Batch ingestion fails partially. Solutions:- Use non-transactional mode:
- Reduce batch size:
Performance Issues
Slow Responses
Problem: API calls taking longer than expected. Solutions:- Use batch operations:
- Use async operations for large data:
- Implement caching:
High Memory Usage
Problem: Application using too much memory. Solutions:- Process data in chunks:
- Clear sensitive data from memory:
Import Errors
Module Not Found
Problem:ModuleNotFoundError: No module named 'kubiya'
Solutions:
- Verify SDK is installed:
- Install SDK:
- Check you’re using the correct Python environment:
Import Errors for Exceptions
Problem: Cannot import exception classes. Solution: Use correct import paths:SDK Version Issues
Deprecated Methods
Problem: Methods or parameters not working as documented. Solutions:- Check SDK version:
- Upgrade to latest version:
- Check breaking changes in release notes
Getting Help
If you’re still experiencing issues:- Check SDK Version: Ensure you’re using the latest version
- Review Documentation: Check the specific service documentation
- Enable Debug Logging:
- Check Status: Verify Control Plane API status
- Contact Support: Reach out to Kubiya support with:
- SDK version
- Error message
- Minimal code to reproduce
- Expected vs actual behavior
Common Error Messages
Next Steps
Error Handling
Learn about exception handling
Best Practices
SDK best practices guide
Examples
Working code examples
API Reference
Complete API documentation