Traceback (most recent call last):
File "/Users/inada-n/tmp/f.py", line 64, in main
f1()
~~^^
File "/Users/inada-n/tmp/f.py", line 20, in f1
return f2(10)
~~^^^^
File "/Users/inada-n/tmp/f.py", line 25, in f2
f2(n - 1)
~~^^^^^^^
File "/Users/inada-n/tmp/f.py", line 25, in f2
f2(n - 1)
~~^^^^^^^
File "/Users/inada-n/tmp/f.py", line 25, in f2
f2(n - 1)
~~^^^^^^^
[Previous line repeated 7 more times]
File "/Users/inada-n/tmp/f.py", line 27, in f2
return sub.c(f3)
~~~~~^^^^
File "/Users/inada-n/tmp/sub/__init__.py", line 2, in c
f()
~^^
File "/Users/inada-n/tmp/f.py", line 31, in f3
return pathlib.Path("./foo").relative_to(pathlib.Path("./bar"))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/inada-n/work/python/cpython/Lib/pathlib/__init__.py", line 392, in relative_to
raise ValueError(f"{str(self)!r} is not in the subpath of {str(other)!r}")
ValueError: 'foo' is not in the subpath of 'bar'
"Traceback (most recent call last):\n File \"/Users/inada-n/tmp/f.py\", line 64, in main\n f1()\n ~~^^\n File \"/Users/inada-n/tmp/f.py\", line 20, in f1\n return f2(10)\n ~~^^^^\n File \"/Users/inada-n/tmp/f.py\", line 25, in f2\n f2(n - 1)\n ~~^^^^^^^\n File \"/Users/inada-n/tmp/f.py\", line 25, in f2\n f2(n - 1)\n ~~^^^^^^^\n File \"/Users/inada-n/tmp/f.py\", line 25, in f2\n f2(n - 1)\n ~~^^^^^^^\n [Previous line repeated 7 more times]\n File \"/Users/inada-n/tmp/f.py\", line 27, in f2\n return sub.c(f3)\n ~~~~~^^^^\n File \"/Users/inada-n/tmp/sub/__init__.py\", line 2, in c\n f()\n ~^^\n File \"/Users/inada-n/tmp/f.py\", line 31, in f3\n return pathlib.Path(\"./foo\").relative_to(pathlib.Path(\"./bar\"))\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^\n File \"/Users/inada-n/work/python/cpython/Lib/pathlib/__init__.py\", line 392, in relative_to\n raise ValueError(f\"{str(self)!r} is not in the subpath of {str(other)!r}\")\nValueError: 'foo' is not in the subpath of 'bar'\n"
f.py:64: in main
f1()
f.py:20: in f1
return f2(10)
f.py:25: in f2
f2(n - 1)
f.py:25: in f2
f2(n - 1)
f.py:25: in f2
f2(n - 1)
f.py:25: in f2
f2(n - 1)
f.py:25: in f2
f2(n - 1)
f.py:25: in f2
f2(n - 1)
f.py:25: in f2
f2(n - 1)
f.py:25: in f2
f2(n - 1)
f.py:25: in f2
f2(n - 1)
f.py:25: in f2
f2(n - 1)
f.py:27: in f2
return sub.c(f3)
sub/__init__.py:2: in c
f()
f.py:31: in f3
return pathlib.Path("./foo").relative_to(pathlib.Path("./bar"))
../.rye/py/[email protected]/lib/python3.12/pathlib.py:682: in relative_to
raise ValueError(f"{str(self)!r} is not in the subpath of {str(other)!r}")
E ValueError: 'foo' is not in the subpath of 'bar'
ValueError: 'foo' is not in the subpath of 'bar'
Traceback (most recent call first):
12.2/lib/python3.12/pathlib.py:682 relative_to
f.py:31 f3
sub/__init__.py:2 c
f.py:27 f2
f.py:25 f2
f.py:25 f2
f.py:25 f2
f.py:25 f2
f.py:25 f2
f.py:25 f2
f.py:25 f2
f.py:25 f2
f.py:25 f2
f.py:25 f2
f.py:20 f1
f.py:71 main
"ValueError: 'foo' is not in the subpath of 'bar'\nTraceback (most recent call first):\n 12.2/lib/python3.12/pathlib.py:682 relative_to\n f.py:31 f3\n sub/__init__.py:2 c\n f.py:27 f2\n f.py:25 f2\n f.py:25 f2\n f.py:25 f2\n f.py:25 f2\n f.py:25 f2\n f.py:25 f2\n f.py:25 f2\n f.py:25 f2\n f.py:25 f2\n f.py:25 f2\n f.py:20 f1\n f.py:71 main\n"