CloudPickle returns IndexError when trying to pickle _UnPicklable object
まだ誰も着手していません。
評価
調査の方向性
cloudpickle/cloudpickle_fast.py の 634 行目から始め、_Unpicklable を使って issue の BytesIO reproducer を実行します。getstate が NotImplementedError を発生させたときの例外処理を追跡します。reproducer が報告された IndexError を生成しなくなり、元の失敗が一貫して処理されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
The error happens at https://github.com/cloudpipe/cloudpickle/blob/a76f0812ccdbbd1397f36d536dc4d57b6d0557d6/cloudpickle/cloudpickle_fast.py#L634.
When I try to pickle the below class, it is failing with NotImplementedError then it calls the exception, since NotImplemented error is a subclass of RuntimeError, the above code fails during except since e.args is empty.
with io.BytesIO() as file:
pickler = cloudpickle.CloudPickler(file)
pickler.dump(_Unpicklable(1))
class _Unpicklable(object):
def __init__(self, value):
self.value = value
def __eq__(self, other):
return self.value == other.value
def __getstate__(self):
raise NotImplementedError()
def __setstate__(self, state):
raise NotImplementedError()
- 主要言語
- Python
- スター
- 1.9k
- フォーク
- 197
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudpipe/cloudpickle のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cloudpipe/cloudpickle#593 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
cloudpipe/cloudpickle#595 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
cloudpipe/cloudpickle#592 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
cloudpipe/cloudpickle#589 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
cloudpipe/cloudpickle#587 ·
cloudpipe/cloudpickle の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
-
hcocena オープンpolicies-accepted pre-review precheck-passed
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Bioconductor/BiocContributions#214 · コメント 5 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
TencentCloud/Octop#1169 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
521xueweihan/HelloGitHub#3778 ·
-
The version checker's trailing attribute region has no control for a less-than inside a quoted value オープンarea: dashboard area: tests bug perceived difficulty: 2 python
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Nitjsefnie-Harness-Commons/daedalus#1105 · コメント 1 件 ·