> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abv.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Python SDK - Troubleshooting

This page addresses frequently asked questions and common troubleshooting topics for the ABV Python SDK.

For bug reports, please open a ticket on [bug report form](https://smart-forms.saasjet.com/external?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRLZXkiOiJlZmZmN2JhYy0xMzZlLTNkOTUtOGIxYi1hMWQ3NWNkZWM3NGYiLCJpYXQiOjE3NTY4NDU1MTk1NzN9._OjNB4ESzMwKHLbUJPaQOjVQQqB7aCoKiCaFxhBrFoo). For general questions or support, visit our support page.

* **Authentication Issues**:
  * Ensure `ABV_API_KEY` and `ABV_HOST` (if not using default host) are correctly set either as environment variables or in the `ABV()` constructor.
  * Use `abv.auth_check()` after initialization to verify credentials. Do not use this in production as this method waits for a response from the server.
* **No Traces Appearing**:
  * Check if `tracing_enabled` is `True` (default).
  * Verify `sample_rate` is not `0.0`.
  * Ensure `abv.shutdown()` is called or the program exits cleanly to allow `atexit` hooks to flush data. Manually call `abv.flush()` to force data sending.
  * Enable debug logging (`debug=True` or `ABV_DEBUG="True"`) to see SDK activity and potential errors during exporting.
* **Incorrect Nesting or Missing Spans**:
  * Ensure you are using context managers (`with abv.start_as_current_span(...)`) for proper context propagation.
  * If manually creating spans (`abv.start_span()`), ensure they are correctly ended with `.end()`.
  * In async code, ensure context is not lost across `await` boundaries if not using ABV's async-compatible methods.
* **Media Not Appearing**:
  * Ensure `ABVMedia` objects are correctly initialized and passed in `input`, `output`, or `metadata`.
  * Check debug logs for any media upload errors. Media uploads happen in background threads.

If you encounter persistent issues, please:

1. Enable debug logging to gather more information.
2. Check the ABV status page.
3. Raise an issue to our [support](https://smart-forms.saasjet.com/external?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRLZXkiOiJlZmZmN2JhYy0xMzZlLTNkOTUtOGIxYi1hMWQ3NWNkZWM3NGYiLCJpYXQiOjE3NTY4NDU1MTk1NzN9._OjNB4ESzMwKHLbUJPaQOjVQQqB7aCoKiCaFxhBrFoo) with details about your setup, SDK version, code snippets, and debug logs.
