-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Misleading error message when pathlib.Path.symlink_to() fails with permissions error #89389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Reproduction Steps:
Actual: Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/pathlib.py", line 1382, in symlink_to
if self._closed:
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/pathlib.py", line 445, in symlink
def symlink(a, b, target_is_directory):
PermissionError: [Errno 13] Permission denied: '/tmp/tmp/target' -> '/tmp/tmp/src' Expected: >>> import os
>>>
>>> os.symlink(str(src), str(target))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
PermissionError: [Errno 13] Permission denied: '/tmp/tmp/src' -> '/tmp/tmp/target' |
|
Oh I see what you mean, sorry about that, maybe the comperison to It still feels wrong to me with since I am trying to make src symlink(point) to target and in the error message it looks like I am trying to do the other way around. |
I believe this is a duplicate of #73843. |
Closing - duplicate of #73843. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: