Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ArsenLuca opened this issue Jan 12, 2021 · 0 comments

Comments

@ArsenLuca
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant