Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Example 39c_serverless_code_execution.py needs to be changed for it to work

オープン 初心者向け
#512 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

@nthmost-orkes がすでに取り組んでいます。

2026年9月24日 から。

  • #513 @nthmost-orkes による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
90/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
cli, tooling

調査の方向性

問題はファイル Example 39c_serverless_code_execution.py にあります。修正方法は、行 mock_server = _start_mock_server(port=9753) を if __name__ == "__main__": ブロック内に移動し、モジュールが再インポートされた際のポート競合を防ぐことです。変更後、スクリプトを実行し、'Address already in use' エラーなしで起動し、エージェントコードが正常に実行されることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

currently we have start_mock_server not inside main. Moving it to main works

── Agent setup ───────────────────────────────────────────────────────

mock_server = _start_mock_server(port=9753)

serverless_coder = Agent(
name="serverless_coder",
model=settings.llm_model,
code_execution=CodeExecutionConfig(
executor=ServerlessCodeExecutor(
endpoint="http://127.0.0.1:9753/execute",
language="python",
timeout=15,
),
),
instructions=(
"You write Python code that runs on a remote execution service. "
"Use the execute_code tool to run code remotely."
),
)

if name == "main":
### #mock_server = _start_mock_server(port=9753). -> ADD THIS
with AgentRuntime() as runtime:
print("--- Serverless Code Execution ---")
result = runtime.run(
serverless_coder,
"Calculate 2**100 and print the result.",
)
result.print_result()

This was a claude code suggested fix and it works.
Claude's reasoning:
Before: mock_server = _start_mock_server(9753) was outside. You start the script — port 9753 grabbed. Worker starts, re-imports the file, hits that same line, tries to grab 9753 again. Already taken → Address already in use → worker dies.

After: it's inside the if. You start the script — port grabbed once. Worker re-imports, reaches the if, sees it's false, skips it. No second bind. Worker lives.

主要言語
Python
スター
104
フォーク
44
平均マージ
4日 18時間
マージ済み PR(30日)
3

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

conductor-oss/python-sdk のほかの issue

conductor-oss/python-sdk の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。