lycon icon indicating copy to clipboard operation
lycon copied to clipboard

When lycon.save 10000+ times, it occurs Fatal Python error: deallocating None

Open ArsenLuca opened this issue 3 years ago • 0 comments

As title states

` import lycon from tqdm import tqdm image_full_path = "00010640.jpg" # any image

for i in tqdm(range(20000)): image = lycon.load(image_full_path) image = lycon.resize(image, width=512, height=512, interpolation=lycon.Interpolation.LINEAR) lycon.save("test.jpg", image) ` It happens at about the 10344th iteration:

` 52%|██████████████████████████████████████████████████████████████████████████████████████▎ | 10344/20000 [01:06<00:56, 171.48it/s]Fatal Python error: deallocating None

Thread 0x00007f46eb57e700 (most recent call first): File "/root/anaconda3/envs/xxx/lib/python3.7/threading.py", line 300 in wait File "/root/anaconda3/envs/xxx/lib/python3.7/threading.py", line 552 in wait File "/root/anaconda3/envs/xxx/lib/python3.7/site-packages/tqdm/_monitor.py", line 60 in run File "/root/anaconda3/envs/xxx/lib/python3.7/threading.py", line 926 in _bootstrap_inner File "/root/anaconda3/envs/xxx/lib/python3.7/threading.py", line 890 in _bootstrap `

But if I use cv2.imwrite instead of lycon.save, no such fatal error happened @ethereon @aleozlx

ArsenLuca avatar Jan 12 '21 11:01 ArsenLuca