SystemError in `ImagePath.Path` item assignment and `ImageDraw` coordinates
Los mantenedores suelen responder en 1 día
@shivanshjain456 ya está trabajando en esto.
Desde el 22/10/2026.
- #10287 de @shivanshjain456 — abierto
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 66/100
Línea de trabajo
Start by reading src/path.c, focusing on item assignment and assign_item_to_array(). Reproduce the list assignment case and the invalid coordinate conversion case with the examples in the issue, then check nearby tests for ImagePath.Path assignment and ImageDraw coordinates. Done means both cases raise normal Python exceptions instead of SystemError, with tests covering the regressions.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Environment
- Pillow 13.0.0, the official wheel from PyPI
- Python 3.12.15
- Debian GNU/Linux 13 (trixie), x86_64
Summary
Two places in src/path.c let invalid input escape as SystemError, which implies an internal error, instead of a normal Python exception. First, item assignment on an ImagePath.Path passes the assigned value to PyArg_ParseTuple(), which only accepts tuples. So path[0] = [1, 2] raises SystemError, although the constructor accepts list pairs. Second, when coordinates are flattened, assign_item_to_array() converts ints with PyLong_AS_LONG() and other numbers with PyFloat_AsDouble(), without checking for errors.
Reproducers
from PIL import ImagePath
p = ImagePath.Path([(0, 0), (1, 1)])
p[0] = (1, 2)
p[0] = [1, 2] # SystemError
Traceback (most recent call last):
File "repro1.py", line 5, in <module>
p[0] = [1, 2] # SystemError
~^^^
SystemError: new style getargs format but argument is not a tuple
or
from decimal import Decimal
from PIL import Image, ImageDraw, ImagePath
class Coord:
def __float__(self):
raise ValueError("bad coordinate")
draw = ImageDraw.Draw(Image.new("RGB", (4, 4)))
draw.line([Decimal("sNaN"), 0, 1, 1])
- Lenguaje dominante
- Python
- Estrellas
- 13.9k
- Forks
- 2.5k
- Merge medio
- 1 d 8 min
- PR fusionados (30 d)
- 149
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
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 python-pillow/Pillow
-
Warn that pre-applying arabic_reshaper + python-bidi corrupts text on a Raqm buildPosiblemente ocupada @Syamjith-NK la tomó hace 54 días. AbiertoDocumentation Font Rendering PNG Third Party Framework
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
python-pillow/Pillow#9907 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Image.putpixel incorrectly labels supported arguments in type annotationsPosiblemente ocupada @radarhere la tomó hace 182 días. AbiertoPNG
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
python-pillow/Pillow#9584 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Release Pillow 13.1.0 on January 2, 2027Posiblemente ocupada @radarhere la tomó hoy. AbiertoRelease
python-pillow/Pillow#10276 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Fix attach SBOM to GitHub release againPosiblemente ocupada @radarhere la tomó hoy. AbiertoRelease
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
python-pillow/Pillow#10275 · 6 comentarios ·
Los mantenedores suelen responder en 1 día
-
Future of JPEG2000 supportAbiertoJPEG
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
python-pillow/Pillow#10241 · 4 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de python-pillow/Pillow
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
fossasia/visdom-dev#69 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Frontend build fails with Frappe version-16: DataImport is no longer exported by @framework/uiAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
BUG: PROD: v1.3.0-beta Onboarding Profile Picture Misaligns When Name Validation Error AppearsPosiblemente ocupada @RitikaSen27 la tomó hoy. Abiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
AOSSIE-Org/PictoPy#1647 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
[oblt-aw][autodoc] Update workflow docs for gh-aw v0.92.5 and detector permission scopePosiblemente ocupada @github-actions la tomó hoy. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día