# ServiceBusError: Handler failed: 'NoneType' object has no attribute 'settle_messages'

[kashifkhan (maintainer)]: The AttributeError after a link detach on Service Bus receivers was fixed in a new azure-servicebus release, so upgrade the library. Until then, catch the AttributeError and retry the completion operation.

## Context from the issue
gh:Azure/azure-sdk-for-python#30514: Issue Azure/azure-sdk-for-python#30514 (closed, 33 comments): - **Package Name**: azure-servicebus - **Package Version**: 7.10.0 - **Operating System**: Linux - **Python Version**: 3.10.7 **Describe the bug** Rarely I am receiving this error `ServiceBusError` with this traceback: ``` File "[string]", line 1, in [module] File "/app/app.py", line 82, in main message_handler.listen( File "/app/app.py", line 138, in listen for input_ in service_bus_receiver.receive(cancellation=cancellation): File "/root/.cache/pypoetry/virtualenvs/app-9TtSrW0h-py3.10/lib/python3.10/site-packages/possibler/sb/input/receiver.py", line 227, in receive...