Error when trying to switch context due to an issue with path template

So after lots of debugging and googling, I stumbled upon this article that solve the issue.

The main issue I had was a 2 different keys with different names that were representing the same field on a sequence, in this case, sequence name and shot name.