Troubleshooting
Common issues and solutions for Streamblocks.
Blocks Not Detected
Problem: Blocks are not being detected from the stream.
Solutions:
-
Check syntax configuration: Ensure you've registered the correct syntax in the registry:
-
Verify block format: Ensure your blocks match the expected format:
-
Enable debug logging:
Events Not Emitted
Problem: Expected events are not being emitted.
Solutions:
-
Check event flags: Use ProcessorConfig to control which events are emitted:
from hother.streamblocks import StreamBlockProcessor from hother.streamblocks.core.processor import ProcessorConfig config = ProcessorConfig( emit_text_deltas=True, # Enable text delta events emit_section_end_events=True, # Enable section end events ) processor = StreamBlockProcessor(registry, config=config) -
Verify stream is being consumed:
Adapter Issues
Problem: Stream adapter not working correctly.
Solutions:
-
Use correct adapter:
-
Try auto-detection:
Import Errors
Problem: Cannot import Streamblocks modules.
Solutions:
-
Check installation:
-
Install with extras:
Memory Issues
Problem: High memory usage with large streams.
Solutions:
-
Process events immediately:
-
Set block size limits: Use ProcessorConfig to limit block sizes:
Getting Help
If you're still having issues:
- Check the examples for working code
- Review the API reference
- Open an issue on GitHub