My application has its own audio library, which itself uses the BASS library.
I create and destroy BASS stream objects throughout the program.
When my program exits, by accident (I still do not understand the template), I get the following notification on my console:
Exception TypeError: "'NoneType' object is not callable" in <bound method stream.__del__ of <audio.audio_player.stream object at 0xaeda2f0>> ignored
My audio library (audio / audio_player.py [Stream class]) contains a class that creates a BASS stream object and then allows the code to manipulate it. When a class is destroyed (in the del subroutine), it calls BASS_StreamFree to clear any resources that BASS could allocate.
(audio_player.py)
from pybass import * from ctypes import pointer, c_float, c_long, c_ulong, c_buffer import os.path, time, threading
My first inclination based on this post is that somewhere in my code an instance of my stream class becomes an orphan (no longer assigned to a variable), and Python is still trying to call its del when the application closes, but by then when he tries to delete an object.
This application does use wxWidgets and therefore uses some threads. The fact that I have not been given the actual name of the variable makes me believe in what I said in the previous paragraph.
I'm not sure which code will be relevant for debugging. The message seems harmless, but I don't like the idea of a “ignored” exception in the final production code.
Are there any tips for debugging?