mpcabd / python-arabic-reshaper

Reconstruct Arabic sentences to be used in applications that don't support Arabic
MIT License
401 stars 80 forks source link

TypeError: '>' not supported between instances of 'str' and 'int' #93

Closed aliaminibagh closed 7 months ago

aliaminibagh commented 7 months ago

when in the last step I wanna add text to my image, I get this error :

start.append(math.modf(xy[i])[0])
    try:
--> mask, offset = font.getmask2(
    text,
     mode,
...
--> pixels = max(1, width) * max(1, height)
    if pixels > 2 * Image.MAX_IMAGE_PIXELS:
     return

TypeError: '>' not supported between instances of 'str' and 'int'
hosseinofj commented 7 months ago

this error said your "pixels" is string you can check the value of that before if.

aliaminibagh commented 7 months ago

this error said your "pixels" is string you can check the value of that before if.

Thanks. but these lines are a section of original package.

my problem be solved by using another pillow version version (10.0.1)