JSON serialization error
@ayjayt ya está trabajando en esto.
Desde el 10/1/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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)
- Lenguaje dominante
- Python
- Estrellas
- 504
- Forks
- 65
- Merge medio
- 6 d 9 h
- PR fusionados (30 d)
- 2
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de plotly/kaleido
-
Writing to an existing directory whose name has a dot fails with "Invalid format"Posiblemente ocupada @RaphaelFakhri la tomó hace 13 días. Abiertobug P3 size: 1
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
-
Deterministic Rendering ChallengesQuizá libre de nuevo @camdecoster la tomó hace 68 días y no hay ningún pull request abierto. Abiertoenhancement feature P2 size: 5
-
[FEATURE]: Embed custom fonts into vector exports (no system install)Posiblemente ocupada @camdecoster la tomó hace 125 días. Abiertoenhancement P3 size: 3
-
enhancement feature P3 size: 5
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
GlobalKaleidoServer is not thread-safePosiblemente ocupada @talleibman la tomó hace 250 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Todos los issues de plotly/kaleido
Issues similares
-
needs-area-label
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 2 días
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Official-Space-AI/OpenPhysGraspGen#114 ·
Los mantenedores suelen responder en 2 días
-
changelog investigate
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
ramnes/notion-sdk-py#441 ·
-
qa_bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
NVIDIA-NeMo/Gym#5644 ·
Los mantenedores suelen responder en 2 días
-
BUG: catalog database credentials printed to logs at startupPosiblemente ocupada @cjboyle la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día