Skip to content
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

OSXProcess.pid_from_name failing to find process IDs #21

Open
jakeharris opened this issue Oct 20, 2018 · 1 comment
Open

OSXProcess.pid_from_name failing to find process IDs #21

jakeharris opened this issue Oct 20, 2018 · 1 comment

Comments

@jakeharris
Copy link

When attempting to fetch memory on mac OS like so:

from memorpy import MemWorker

application_name = "OpenEmu"

memory_worker = MemWorker(name=application_name)

search_results = [x for x in memory_worker.mem_search(36)]

I received the following consistent traceback:

Traceback (most recent call last):
  File "reader-prototype.py", line 5, in <module>
    memory_worker = MemWorker(name=application_name)
  File "/Users/milieu/Projects/read-snes/venv/lib/python2.7/site-packages/memorpy/MemWorker.py", line 35, in __init__
    self.process = Process.Process(name=name, pid=pid, debug=debug)
  File "/Users/milieu/Projects/read-snes/venv/lib/python2.7/site-packages/memorpy/OSXProcess.py", line 62, in __init__
    self.pid=OSXProcess.pid_from_name(name)
  File "/Users/milieu/Projects/read-snes/venv/lib/python2.7/site-packages/memorpy/OSXProcess.py", line 101, in pid_from_name
    if name in dic['exe']:
KeyError: 'exe'
@SJS830
Copy link

SJS830 commented Feb 28, 2021

This error can be fixed by changing this line: if name in dic['exe']: to if name in dic['name']:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants