AttributeError: type object Signature has no attribute _encoding
まだ誰も着手していません。
評価
調査の方向性
まず、Python 3.9.16、pygit2 v1.12.2、PyPI からインストールした Ray を使用する Docker 環境で、提供された再現手順を実行し、Ray ありの場合となしの場合の実行を比較します。Signature が _encoding を失うタイミングを追跡し、焦点を絞った回帰テストを特定します。完了の条件は、再現された Ray のケースで AttributeError が発生しなくなることです。
索引モデルが issue の本文から書いたものです。
説明
Hi folks!
I'm running into this weird error when running my python code with ray.
Basically I get AttributeError: type object 'Signature' has no attribute '_encoding'.
But it works fine when I run my script without ray...
pygit2 version: v1.12.2
environment: python:3.9.16 docker container.
The error can be reproduced with the code below.
Ray can be installed from PyPi: pip install ray
import pygit2
import ray
from pygit2 import Signature
def function_without_ray():
org_name = "libgit2"
repo_name = "pygit2"
repo = pygit2.clone_repository(
f"https://github.com/{org_name}/{repo_name}",
f"/tmp/{repo_name}.git",
)
new_branch = repo.branches.create(
"dummy-branch", repo.revparse_single("HEAD")
)
repo.checkout(new_branch)
index = repo.index
index.add_all()
index.write()
author = Signature("John Doe", "john@doe.com")
ref = repo.head.name
tree = index.write_tree()
parents = [repo.head.target]
repo.create_commit(
ref,
author,
author,
"Just a dummy commit",
tree,
parents,
)
@ray.remote
def function_with_ray():
function_without_ray()
# Comment out one of these function calls to check if it works:
ray.get(function_with_ray.remote())
function_without_ray()
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 408
- 平均マージ
- 2日 57分
- マージ済み PR(30日)
- 7
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
libgit2/pygit2 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
似ている issue
-
link-check link-check:sphinx-theme
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
OpenHands/extensions#626 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
CSCfi/sd-search-api#39 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100