pycharm Python error: PermissionError: [Errno 13] Permission denied:

今天用pycharm调试代码的时候,遇见了PermissionError: [Errno 13] Permission denied:, 但是我实际上是有权限的,查看资料,发现原来是 debug 配置i里脚本的地方,填写了一个文件夹的路径,不是一个文件,就报了这个错:

 

 

 

C:\Users\[username]\AppData\Local\Programs\Python\Python36\python.exe "C:\Program Files\JetBrains\PyCharm 2018.1\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 64355 --file D:/code/movie
Error in sitecustomize; set PYTHONVERBOSE for traceback:
NameError: name 'modules_list' is not defined
pydev debugger: process 10736 is connecting

Connected to pydev debugger (build 181.4203.547)
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2018.1\helpers\pydev\pydevd.py", line 1664, in <module>
main()
File "C:\Program Files\JetBrains\PyCharm 2018.1\helpers\pydev\pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files\JetBrains\PyCharm 2018.1\helpers\pydev\pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2018.1\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 11, in execfile
stream = tokenize.open(file) # @UndefinedVariable
File "C:\Users\[username]\AppData\Local\Programs\Python\Python36\lib\tokenize.py", line 452, in open
buffer = _builtin_open(filename, 'rb')
PermissionError: [Errno 13] Permission denied: 'D:/code/movie'

 

这里一定要填写文件的路径,比如:

 

这样就OK了

posted @   锐洋智能  阅读(4839)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· Obsidian + DeepSeek:免费 AI 助力你的知识管理,让你的笔记飞起来!
· 分享4款.NET开源、免费、实用的商城系统
· 解决跨域问题的这6种方案,真香!
· 5. Nginx 负载均衡配置案例(附有详细截图说明++)
· Windows 提权-UAC 绕过
历史上的今天:
2014-01-16 java中ant包中的org.apache.tools.zip实现压缩和解压缩
点击右上角即可分享
微信分享提示