gpt4 book ai didi

python - PermissionError : [WinError 5] Access denied

转载 作者:行者123 更新时间:2023-12-03 11:14:33 26 4
gpt4 key购买 nike

我正在尝试使用subprocess调用python程序,但出现权限错误。我尝试以管理员身份运行PyCharm,但这无济于事。

我的代码:

answer = subprocess.check_output("../folder python program %s %s" %(valueA, valueB), encoding = 'utf8')

错误:

Traceback (most recent call last):
File "C:/Users/User/PycharmProjects/a/b/b_resolution.py", line 35, in <module>
answer = subprocess.check_output("../folder python program %s %s" %(valueA, valueB), encoding = 'utf8')
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\Lib\subprocess.py", line 376, in check_output
**kwargs).stdout
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\Lib\subprocess.py", line 453, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\Lib\subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\Lib\subprocess.py", line 1155, in _execute_child
startupinfo)
PermissionError: [WinError 5] Access Denied

有人知道我该如何解决此权限错误?

最佳答案

检查当前用户的文件权限。

右键单击文件,然后在安全性上可以看到用户的文件权限。

如果您无权读取文件,请选择“高级”>“选择主体”,然后选择check this doc.

关于python - PermissionError : [WinError 5] Access denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59777157/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com