I'm having trouble with using following lines on my AWS instance. Code works perfectly fine on my Macbook. What's the problem here? I've checked directory, it exists, there is not problem with path.
s = str(Path(Path('__file__').parents[1] / 'lib'))
print(s)
.
File "/usr/lib/python3.6/pathlib.py", line 594, in __getitem__
raise IndexError(idx)
IndexError: 1