Python - CouldNotOpenProcess gta_sa.exe

belle_delphine.py

Active member
Joined
Jul 28, 2019
Messages
46
Reaction score
11
Location
Sibiu
I tried running this code, to see if it could open the process so I can play with some memory addresses, but I don't understand why the exception from the title would occur.

Python:
import pymem

from pymem import Pymem


class GT:
    def __init__(self) -> None:
        self.process = Pymem("gta_sa.exe")

    def close(self) -> None:
        self.process.close_process()

gta_sa = GT()

Exception has occurred: CouldNotOpenProcess
Could not open process: pid of the game
do you guys have any ideea why?
 

belle_delphine.py

Active member
Joined
Jul 28, 2019
Messages
46
Reaction score
11
Location
Sibiu
Code:
import pymem


pm = pymem.Pymem("gta_sa.exe")

# Do something with the process handle

pm.close_process()
still the same
 
Top