Error while trying to use dynamic routing to pass variables to the template and using them
Try this:

{% set category = craft.categories(segmentCategory).first %}


Without the first at the end, you're setting category to an ElementCriteriaModel. Which would be fine in many cases, but it's not an acceptable variable type for targetElement.

Ditto for the sourceElement:

craft.entries.section(segmentEntryType).status(null).first