Description
What are you really trying to do?
I modified poetry file to use temporalio version 1.4.0 and then ran worker.py of your_visibility folder of the DOCUMENTATION_SAMPLES_PYTHON repository (https://github.com/temporalio/documentation-samples-python)
Then I use cli command to trigger workflow
temporal workflow start --task-queue search-attributes-task-queue --type GreetingWorkflow
After doing that I get an error:
"coroutine raised StopIteration"
This error doesn't happen for version Python SDK 1.3.0 when I trigger workflow from cli
Describe the bug
I found that when you trigger a workflow who has calls to workflow.upsert_search_attributes using cli for for Temporalio Python SDK version 1.4.0, you get error Coroutine Raised StopIteration
File "/Users/awengierko/Documents/Projects/documentation-samples-python/.venv/lib/python3.11/site-packages/temporalio/worker/_workflow_instance.py", line 1888, in execute_workflow
return await input.run_fn(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: coroutine raised StopIteration
Failed activation on workflow GreetingWorkflow with ID 9e14f703-b1de-4031-9213-fb43b405a660 and run ID cf74cb1b-0bb2-4d08-a711-312c3f050cfb


Minimal Reproduction
- Clone repo https://github.com/temporalio/documentation-samples-python
- Update pyproject.toml to use temporalio = "^1.4.0" instead of temporalio = "^1.3.0"
- Terminal 1 -> Run worker: python worker.py
- Terminal 2 -> Trigger Workflow exeuction: temporal workflow start --task-queue search-attributes-task-queue --type GreetingWorkflow
- See in Terminal 2: Error message "coroutine raised StopIteration"
Environment/Versions
- OS and processor: M2 Mac
- Temporal Version: 1.4.0
- Are you using Docker or Kubernetes or building Temporal from source? No