list[str]
is a canonical type annotation in python 3.11 but Azure Functions is rejecting it with an error in an activity. Where can I find a complete list of type annotations that are valid and acceptable to use in a parameter list for an activity?
2023-11-30T02:44:26Z [Error] 66f4a748af294015bf753f63840015ae: Function 'wfrqyOrchestrator (Orchestrator)' failed with an error. Reason: Message: Activity function 'Finalout' failed: FunctionLoadError: cannot load the Finalout function: binding payload has invalid non-type annotation list[str] {"$type":"System.Exception, System.Private.CoreLib","ClassName":"System.Exception","Message":" FunctionLoadError: cannot load the Finalout function: binding payload has invalid non-type annotation list[str]","Data":null,"InnerException":{"$type":"Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException, Microsoft.Azure.WebJobs.Script","IsUserException":false,"RemoteStackTrace":" File "/azure-functions-host/workers/python/3.11/LINUX/X64/azure_functions_worker/dispatcher.py", line 393, in _handle__function_load_request\n self._functions.add_function(\n File "/azure-functions-host/workers/python/3.11/LINUX/X64/azure_functions_worker/functions.py", line 338, in add_function\n input_types, output_types = self.validate_function_params(params,\n
The activity is in python :
import asyncio
import azure.functions as func
async def main( payload: list[str] , outputblob: func.Out[str] ) -> str:
outputblob.set( payload[0] + payload[1] )
return("Finalout")
Corresponding function.json :
{
"scriptFile": "__init__.py",
"bindings": [
{
"name": "payload",
"type": "activityTrigger",
"direction": "in"
},
{
"name": "outputblob",
"type": "blob",
"dataType": "string",
"path": "books/testout.json",
"connection": "BlobStorageConnection",
"direction": "out"
}
],
"disabled": false
}