The python os module seems to be incorrectly joining paths. To replicate, simply run the following code:
import os
p1 = "/1/2"
p2 = "/3/4"
print(os.path.join(p1,p2))
Which will print "/3/4". Is this the expected behaviour? I would expect it to print "/1/2/3/4"
/, they are by definition paths from the root - if you were to access one from the other or the other way around, you'd always get the absolute path from the root, soos.joinis correct. Compare ifp1 = "/1/2"andp2 = "3/4"/somewhere in the code so I added a/to the start of the path for joining purposes, but this only made it worse! Thanks