Two things:
bugfix: error is thrown because of set(None), fixed.
set(None)
Test fails. Most probably to a wrongly set keyword ('weights') in the test?