Lost need help with errors

im new to python trying to learn but i dont understand why this keeps popping up

 Traceback (most ?recent call last):
  File "C:\Users\mseln\AppData\Local\Programs\Python\Python312\try 1.py", line 5, in <module>
    process = rwm.get_process_by_name("project.dll")
  File "C:\Users\mseln\AppData\Local\Programs\Python\Python312\Lib\site-packages\ReadWriteMemory\__init__.py", line 169, in get_process_by_name
    raise ReadWriteMemoryError(f'Process "{self.process.name}" not found!')
ReadWriteMemory.ReadWriteMemoryError: Process "project.dll.exe" not found!

Without more details this is not easy, but I am assuming you are using ReadWriteMemory · PyPI on Windows, and you are trying to read/write the memory of a process.

It looks like this exception is raised because there is no process named “project.dll” running on your system. Perhaps you can list the running processes with rwm.enumerate_processes(), and see if what you are looking for is there.

2 Likes

This part says where in your code to look, because it’s the last thing mentioned from your own code.

This is the code from your file where the problem occurred. When it tried to use the library,

This is the part of the library code where a problem happened.

And this is what the library says is wrong.

You haven’t shown anything to do with your own code, or explained what the overall code is supposed to do, or what you don’t understand exactly about the problem. But it seems pretty clear. It looks like, in your code, you asked the library to find that process, and the library said that there isn’t such a process to find.

I notice that the library tried to add .exe to the name that you specified. Maybe you were expecting DLLs to get a separate process on Windows? I don’t think they do. But that is a question about Windows, not a question about Python.

At any rate, if you are “new to python trying to learn” I strongly recommend that you follow a tutorial for Python itself from start to finish first - you will get lots of practice with looking at tracebacks and understanding how to locate the problem with them; with understanding the exception types and messages; and with carefully checking what the code does in order to diagnose problems. Any time that you can’t solve the problem yourself with these standard techniques, at least you will have learned to produce the sort of example that other programmers find useful for examining the problem.

1 Like

When asking a question please post the simplest code that reproduces the error, along with the full error message.