psutil._exceptions.AccessDenied: psutil.AccessDenied
See original GitHub issueI’m trying to use standordCoreNLP and getting an error:
from stanfordcorenlp import StanfordCoreNLP
..
..
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/psutil/_psosx.py", line 330, in wrapper
return fun(self, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/psutil/_psosx.py", line 515, in connections
rawlist = cext.proc_connections(self.pid, families, types)
PermissionError: [Errno 1] Operation not permitted
..
..
During handling of the above exception, another exception occurred:
nlp = StanfordCoreNLP("/Users/NLP_models/stanford-corenlp-full-2018-01-31")
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/stanfordcorenlp/corenlp.py", line 79, in __init__
if port_candidate not in [conn.laddr[1] for conn in psutil.net_connections()]:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/psutil/__init__.py", line 2108, in net_connections
return _psplatform.net_connections(kind)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/psutil/_psosx.py", line 249, in net_connections
cons = Process(pid).connections(kind)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/psutil/_psosx.py", line 335, in wrapper
raise AccessDenied(self.pid, self._name)
psutil._exceptions.AccessDenied: psutil.AccessDenied (pid=13041)
I tried to follow suggestions here: https://github.com/ContinuumIO/anaconda-issues/issues/6006 But it didn’t work - any idea?
Issue Analytics
- State:
- Created 6 years ago
- Comments:25 (1 by maintainers)
Top Results From Across the Web
Getting 'psutil.AccessDenied (pid=6836)' error using psutil
AccessDenied : psutil.AccessDenied (pid=6836) Process finished with exit code 1. am I doing something wrong with this simple code? or is ...
Read more >psutil.AccessDenied (pid=7868) · Issue #1774 - GitHub
I'm trying to kill a process (zoom.exe) with psutil. However, I'm getting an error psutil.AccessDenied . I have all the permissions to do...
Read more >AccessDenied in psutil - Florianrein's Blog
In this QQ-QA, I am going to show you how to handle AccessDenied errors with psutil, a process monitoring package for the Python...
Read more >psutil documentation — psutil 5.9.5 documentation
The psutil documentation you're reading is distributed as a single HTML page. ... prepared to catch NoSuchProcess and AccessDenied exceptions. hash builtin ...
Read more >Python psutil 模块,AccessDenied() 实例源码 - 编程字典
Python psutil 模块,AccessDenied() 实例源码. 我们从Python开源项目中,提取了 ... AccessDenied, psutil. ... """Decorator to Ignore AccessDenied exceptions.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

You have to run your code as root. Please refer to How to run a script as root on Mac OS X? Let me know if you still have problems.
代码里面需要调式,怎么处理这个问题呢?