I'm using warnings.warn(), together with a print, but the warnings are not returned:
if[1!=2]:
    print('Error')
    warnings.warn('Warning!')
#returns:  Error
I'm using Jupyter. Would appreciate if someone could assist
I'm using warnings.warn(), together with a print, but the warnings are not returned:
if[1!=2]:
    print('Error')
    warnings.warn('Warning!')
#returns:  Error
I'm using Jupyter. Would appreciate if someone could assist
 
    
    I was having the same issue.
My solution was to switch to python's logging package.
import logging
logging.warning("Warning!")
It printed to the console on my end!
