JSON serialization error
@ayjayt がすでに取り組んでいます。
2025年1月10日 から。
評価
この issue はまだ評価されていません。
説明
With Kaleido 1.0.0rc0, running the skimage gallery example below, I see the following error:
File "/home/stefan/envs/py313/lib64/python3.13/site-packages/kaleido/__init__.py", line 129, in to_image
response = await tab.send_command("Runtime.callFunctionOn", params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/stefan/envs/py313/lib64/python3.13/site-packages/choreographer/pipe.py", line 56, in write_json
message = simplejson.dumps(obj, ensure_ascii=False, ignore_nan=True, cls=self.json_encoder)
File "/home/stefan/envs/py313/lib64/python3.13/site-packages/simplejson/__init__.py", line 395, in dumps
**kw).encode(obj)
~~~~~~^^^^^
File "/home/stefan/envs/py313/lib64/python3.13/site-packages/simplejson/encoder.py", line 298, in encode
chunks = self.iterencode(o)
File "/home/stefan/envs/py313/lib64/python3.13/site-packages/simplejson/encoder.py", line 379, in iterencode
return _iterencode(o, 0)
File "/home/stefan/envs/py313/lib64/python3.13/site-packages/choreographer/pipe.py", line 34, in default
return simplejson.JSONEncoder.default(self, obj)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
File "/home/stefan/envs/py313/lib64/python3.13/site-packages/simplejson/encoder.py", line 274, in default
raise TypeError('Object of type %s is not JSON serializable' %
o.__class__.__name__)
TypeError: Object of type uint16 is not JSON serializable
I first picked this up on CI, where the same thing happened.
import plotly.express as px
import plotly.io
plotly.io.renderers.default = "sphinx_gallery_png"
import skimage as ski
data = ski.data.kidney()
n_plane, n_row, n_col, n_chan = data.shape
v_min, v_max = data[:, :, :, 1].min(), data[:, :, :, 1].max()
print(f'range: ({v_min}, {v_max})')
fig1 = px.imshow(
data[n_plane // 2, :, :, 1],
zmin=v_min,
zmax=v_max,
labels={'x': 'col', 'y': 'row', 'color': 'intensity'},
)
plotly.io.show(fig1)
- 主要言語
- Python
- スター
- 504
- フォーク
- 65
- 平均マージ
- 6日 9時間
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
plotly/kaleido のほかの issue
-
Writing to an existing directory whose name has a dot fails with "Invalid format"対応中かも @RaphaelFakhri が 13 日前に担当しました。 オープンbug P3 size: 1
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
-
Deterministic Rendering Challenges再び着手できるかも @camdecoster が 68 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement feature P2 size: 5
-
[FEATURE]: Embed custom fonts into vector exports (no system install)対応中かも @camdecoster が 125 日前に担当しました。 オープンenhancement P3 size: 3
-
enhancement feature P3 size: 5
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
GlobalKaleidoServer is not thread-safe対応中かも @talleibman が 250 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
autowarefoundation/autoware_carla_scenario#1485 ·
メンテナーはふだん 1 日以内に返信
-
needs-area-label
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 2 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Official-Space-AI/OpenPhysGraspGen#114 ·
メンテナーはふだん 2 日以内に返信
-
changelog investigate
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
ramnes/notion-sdk-py#441 ·
-
copy_tree splits same-file errors into characters対応中かも @Gambit-Checkmate が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 14 日以内に返信