Closed ElAouaneHamza closed 1 year ago
hey @ElAouaneHamza , sorry for the late response.
I was unable to reproduce the issue on local Ubuntu (WSL2) and azure, as this is an import error, could you help verify locally that even just with the simplest import
you will get the failure as well?
which means the azure function should be just like following:
from azure.servicebus import ServiceBusClient, ServiceBusMessage
def main(message: func.ServiceBusMessage):
sb_client = ServiceBusClient.from_connection_string(...)
also is it that you're developing locally or deployed into the azure cloud when the error is encountered? -- usually I saw this type of error is encounter when there's a local copy of the uamqp project, and the path to which is appended to the PYTHONPATH.
I observe the same problem, local development environment works, when running in azure functions it fails with message: "Failure Exception: ImportError: cannot import name 'c_uamqp' from partially initialized module 'uamqp' (most likely due to a circular import)". When I remove the sent message part to ServiceBus it works fine. I cannot use it as an output because output only supports string and no user_properties support for the message. So, issue is related appears when using a SB trigger and sent a SB in code. Older SDK versions do work.
We now have released the latest azure-servicebus that is using the new python based amqp library. It would be great if you can give that a try. If there are issues with the client library please open an issue on the sdk repo
UAMQP Package Version:
Operating System:
Python Version:
Describe the bug I have a Azure function app to trigger ServiceBusMessage. When the azure function starts, it fails throwing the following error:
My azure functions looks like this:
I have requirements.txt
function.json
and the host
To Reproduce Steps to reproduce the behavior:
Expected behavior The azure function will read the message from A, process the message and send it to B where I am expecting the see
MESSAGE 1
. But what is happening is when I send the message to TOPIC A..the function triggers and fails due to the above error, which cause the message to end in dead letter