Basic example from README broken

Open
#364 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Reproduce the failure with the README files greetings_worker.py, greetings_workflow.py, and helloworld.py using uv run helloworld.py. Start with the task and workflow code named in the traceback, especially task.py and conductor_workflow.py, and verify that the example registers and runs without the reported AttributeError.

Written by the indexing model from the issue text.

Description

bug documentation

Copied all content from readme.

  • greetings_worker.py
  • greetings_workflow.py
  • helloworld.py

Running server via docker-compose on latest main, although this doesn't matter since it's a client error.

Version 1.2.3. Python version 3.11.14.

❯ uv run helloworld.py
Traceback (most recent call last):
  File "/home/discord/github.com/discord/discord/discord_hivemind/conductor/helloworld.py", line 36, in <module>
    main()
  File "/home/discord/github.com/discord/discord/discord_hivemind/conductor/helloworld.py", line 21, in main
    workflow = register_workflow(workflow_executor)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/discord/github.com/discord/discord/discord_hivemind/conductor/helloworld.py", line 10, in register_workflow
    workflow.register(True)
  File "/home/discord/github.com/discord/discord/discord_hivemind/.venv/lib/python3.11/site-packages/conductor/client/workflow/conductor_workflow.py", line 192, in register
    workflow=self.to_workflow_def(),
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/discord/github.com/discord/discord/discord_hivemind/.venv/lib/python3.11/site-packages/conductor/client/workflow/conductor_workflow.py", line 267, in to_workflow_def
    tasks=self.__get_workflow_task_list(),
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/discord/github.com/discord/discord/discord_hivemind/.venv/lib/python3.11/site-packages/conductor/client/workflow/conductor_workflow.py", line 289, in __get_workflow_task_list
    converted_task = task.to_workflow_task()
                     ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/discord/github.com/discord/discord/discord_hivemind/.venv/lib/python3.11/site-packages/conductor/client/workflow/task/task.py", line 140, in to_workflow_task
    if self._cache_ttl_second > 0 and self._cache_key is not None:
       ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/discord/github.com/discord/discord/discord_hivemind/.venv/lib/python3.11/site-packages/conductor/client/workflow/task/task.py", line 185, in __getattribute__
    raise ae
  File "/home/discord/github.com/discord/discord/discord_hivemind/.venv/lib/python3.11/site-packages/conductor/client/workflow/task/task.py", line 180, in __getattribute__
    val = super().__getattribute__(__name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SimpleTask' object has no attribute '_cache_ttl_second'. Did you mean: 'cache_ttl_second'?
Dominant language
Python
Stars
104
Forks
43
Avg merge
1d 13h
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from conductor-oss/python-sdk

All issues in conductor-oss/python-sdk

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.