Share via

Azure function IoTHub device connection state message decode error

Nayangiri Goswami 45 Reputation points
2024-09-10T07:02:24.6533333+00:00

I've a route to forward Azure IoTHub device connection state messages to service bus queue.
On that queue I'm triggering Python function using v2 programming model.

Looks like the trigger is not being decoded properly. Here is the error,

Result: Failure Exception: ValueError: cannot convert value of field 'SequenceNumber' in trigger metadata into int: invalid literal for int() with base 10: '000000000000000001dummy100000004000000000000000000

Azure Service Bus
Azure Service Bus

An Azure service that provides cloud messaging as a service and hybrid integration.

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

Azure IoT Hub
Azure IoT Hub

An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Abiola Akinbade 30,490 Reputation points Volunteer Moderator
    2024-09-10T07:37:49.23+00:00

    This is a python error. You need to check if you input string contains characters that are not valid digits for a base 10 number. See simple explanation here: https://www.geeksforgeeks.org/how-to-fix-valueerror-invalid-literal-for-int-with-base-10-in-python/

    Also: https://learn.microsoft.com/en-us/azure/iot-hub/troubleshoot-error-codes?source=recommendations

    You can mark it 'Accept Answer' and 'Upvote' if this helped you

    Regards,

    Abiola

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.