You can filter the warnings to raise which will enable you to debug (e.g. using pdb):
import warnings
warnings.filterwarnings('error')
*The warnings filter can be managed more finely (which is probably more appropriate) e.g.:
warnings.filterwarnings('error', category=UnicodeWarning)
warnings.filterwarnings('error', message="*equal comparison failed*")
Multiple filters will be looked up sequentially. (“Entries closer to the front of the list override entries later in the list, if both match a particular warning.”)