Skip to content

[Bug] Coroutine Raised StopIteration when triggering workflow execution from CLI for workflows which call workflow.upsert_search_attributes #443

Closed as not planned
@alonwengierko

Description

@alonwengierko

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

Screenshot 2023-12-08 at 21 11 10 Screenshot 2023-12-08 at 21 11 18

Minimal Reproduction

  1. Clone repo https://github.com/temporalio/documentation-samples-python
  2. Update pyproject.toml to use temporalio = "^1.4.0" instead of temporalio = "^1.3.0"
  3. Terminal 1 -> Run worker: python worker.py
  4. Terminal 2 -> Trigger Workflow exeuction: temporal workflow start --task-queue search-attributes-task-queue --type GreetingWorkflow
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions