-
Notifications
You must be signed in to change notification settings - Fork 83
Description
Trying to process many records from confluent kafka and getting the str object error somewhere in the trigger code. Tried with both 3.8 and 3.9 venv. Following is the stack trace. There is no issue in processing record by record.
[2022-09-02T21:27:58.776Z] Exception: AttributeError: 'str' object has no attribute 'type'
[2022-09-02T21:27:58.776Z] Stack: File "/usr/local/Cellar/azure-functions-core-tools@4/4.0.4736/workers/python/3.8/OSX/X64/azure_functions_worker/dispatcher.py", line 388, in _handle__invocation_request
[2022-09-02T21:27:58.776Z] args[pb.name] = bindings.from_incoming_proto(
[2022-09-02T21:27:58.776Z] File "/usr/local/Cellar/azure-functions-core-tools@4/4.0.4736/workers/python/3.8/OSX/X64/azure_functions_worker/bindings/meta.py", line 88, in from_incoming_proto
[2022-09-02T21:27:58.776Z] return binding.decode(datum, trigger_metadata=metadata)
[2022-09-02T21:27:58.776Z] File "/usr/local/Cellar/azure-functions-core-tools@4/4.0.4736/workers/python/3.8/OSX/X64/azure/functions/kafka.py", line 176, in decode
[2022-09-02T21:27:58.776Z] return cls.decode_multiple_events(data, trigger_metadata)
[2022-09-02T21:27:58.776Z] File "/usr/local/Cellar/azure-functions-core-tools@4/4.0.4736/workers/python/3.8/OSX/X64/azure/functions/kafka.py", line 265, in decode_multiple_events
[2022-09-02T21:27:58.776Z] key=cls._decode_typed_data(
[2022-09-02T21:27:58.776Z] File "/usr/local/Cellar/azure-functions-core-tools@4/4.0.4736/workers/python/3.8/OSX/X64/azure/functions/meta.py", line 126, in _decode_typed_data
[2022-09-02T21:27:58.776Z] data_type = data.type
[2022-09-02T21:27:58.776Z] .
[2022-09-02T21:27:58.777Z] Failed to executed function with 64 items in topic_0 / 3 / 2990
[2022-09-02T21:27:58.777Z] System.Private.CoreLib: Exception while executing function: Functions.processeventsconfkafka. System.Private.CoreLib: Result: Failure
[2022-09-02T21:27:58.777Z] Exception: AttributeError: 'str' object has no attribute 'type'
[2022-09-02T21:27:58.777Z] Stack: File "/usr/local/Cellar/azure-functions-core-tools@4/4.0.4736/workers/python/3.8/OSX/X64/azure_functions_worker/dispatcher.py", line 388, in _handle__invocation_request
[2022-09-02T21:27:58.777Z] args[pb.name] = bindings.from_incoming_proto(
[2022-09-02T21:27:58.777Z] File "/usr/local/Cellar/azure-functions-core-tools@4/4.0.4736/workers/python/3.8/OSX/X64/azure_functions_worker/bindings/meta.py", line 88, in from_incoming_proto
[2022-09-02T21:27:58.777Z] return binding.decode(datum, trigger_metadata=metadata)
[2022-09-02T21:27:58.777Z] File "/usr/local/Cellar/azure-functions-core-tools@4/4.0.4736/workers/python/3.8/OSX/X64/azure/functions/kafka.py", line 176, in decode
[2022-09-02T21:27:58.777Z] return cls.decode_multiple_events(data, trigger_metadata)
[2022-09-02T21:27:58.777Z] File "/usr/local/Cellar/azure-functions-core-tools@4/4.0.4736/workers/python/3.8/OSX/X64/azure/functions/kafka.py", line 265, in decode_multiple_events
[2022-09-02T21:27:58.777Z] key=cls._decode_typed_data(
[2022-09-02T21:27:58.777Z] File "/usr/local/Cellar/azure-functions-core-tools@4/4.0.4736/workers/python/3.8/OSX/X64/azure/functions/meta.py", line 126, in _decode_typed_data
[2022-09-02T21:27:58.777Z] data_type = data.type
[2022-09-02T21:27:58.777Z] .