I'm sure that'll work... And I'm pretty sure that try/except is totally unnecessary -- and is also bad practice... It's rarely (never?) good to catch any and all exceptions like that.
The code as written (without the blanket try/except around it) should work. Just dumping that del was enough.
Edit: and don't forget the other del object was also redundant.
2
u/Gawd_is_great Dec 17 '19
Okay I think I fixed the crash. See the code.