It looks like more than a single path cannot be found, so that the length of the list grows.
Can you print this list after the code crashed using print(dataset.cj), where dataset refers to the instance of your current Dataset.
PS: It’s better to post the code directly by wrapping it in three backticks ```, as this will e.g. allow to search for the code