replace warning.wartn with warnings.warn

The import is on warnings, but none of the call had an s, thus failling instead of simply warning