Router python 3 compatiblity