You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to generate images from the CLI using trdg -c 1000 -w 5 -f 64 or a custom Python script I get AttributeError: 'FreeTypeFont' object has no attribute 'getsize'. Specifically on File "C:\Program Files\Python312\Lib\multiprocessing\pool.py", line 125, in worker result = (True, func(*args, **kwds)) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\\AppData\Roaming\Python\Python312\site-packages\trdg\data_generator.py", line 22, in generate_from_tuple cls.generate(*t) File "C:\Users\\AppData\Roaming\Python\Python312\site-packages\trdg\data_generator.py", line 72, in generate image, mask = computer_text_generator.generate( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\y\AppData\Roaming\Python\Python312\site-packages\trdg\computer_text_generator.py", line 36, in generate return _generate_horizontal_text( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\\AppData\Roaming\Python\Python312\site-packages\trdg\computer_text_generator.py", line 107, in _generate_horizontal_text text_height = max([get_text_height(image_font, p) for p in splitted_text]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\\AppData\Roaming\Python\Python312\site-packages\trdg\utils.py", line 122, in get_text_height return image_font.getsize(text)[1]
The text was updated successfully, but these errors were encountered:
When I try to generate images from the CLI using
trdg -c 1000 -w 5 -f 64
or a custom Python script I get AttributeError: 'FreeTypeFont' object has no attribute 'getsize'. Specifically onFile "C:\Program Files\Python312\Lib\multiprocessing\pool.py", line 125, in worker result = (True, func(*args, **kwds)) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\\AppData\Roaming\Python\Python312\site-packages\trdg\data_generator.py", line 22, in generate_from_tuple cls.generate(*t) File "C:\Users\\AppData\Roaming\Python\Python312\site-packages\trdg\data_generator.py", line 72, in generate image, mask = computer_text_generator.generate( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\y\AppData\Roaming\Python\Python312\site-packages\trdg\computer_text_generator.py", line 36, in generate return _generate_horizontal_text( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\\AppData\Roaming\Python\Python312\site-packages\trdg\computer_text_generator.py", line 107, in _generate_horizontal_text text_height = max([get_text_height(image_font, p) for p in splitted_text]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\\AppData\Roaming\Python\Python312\site-packages\trdg\utils.py", line 122, in get_text_height return image_font.getsize(text)[1]
The text was updated successfully, but these errors were encountered: