Let me explain what you have to do to make things work,
First of all you should test the SWALLOW on protege first,
Then save the rule to your ontology
Load the ontology using owlready2 in python,
Notice that the SWRL works with PELLET reasoner,
But sync_reasoner() function runs the HermiT reasoner, so there won't be an inferred objects
Instead of that you should use sync_reasoner_pellet(), the functions added to the newer version of owlready2, you have to make sure you installed this version
Read this carefully
https://owlready2.readthedocs.io/en/latest/reasoning.html#running-the-reasonerIf you still got errors, post it here.
Regards,