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

UnboundLocalError: local variable 'success' referenced before assignment #10

Open
gokurosaki opened this issue Nov 15, 2024 · 0 comments

Comments

@gokurosaki
Copy link

I'm trying to run a DLL that I wrote in Visual Studio for windows through memory but am running into this error when I try to initialize it. I am running Python 3.10.11, I followed the readme's example to set up a basic test but am running into this issue. Any Ideas?

After resolving many imports it reaches this point 
...

DEBUG: Executing TLS.
DEBUG: no TLS address found
DEBUG: Starting new thread to execute PE
DEBUG: Checking for entry point.
DEBUG: Calling dll entrypoint 0x18006f0ff with DLL_PROCESS_ATTACH
exception: access violation writing 0x000000018006F0FF
Exception in thread Thread-1 (execPE):
Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\threading.py", line 1016, in _bootstrap_inner
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\PythonMemoryModule\s.py", line 833, in <module>
    main()
  File "C:\Users\Administrator\Desktop\PythonMemoryModule\s.py", line 807, in main
    startDll(w,h)
OSError: exception: access violation writing 0x000000018006F8B1
    self.run()
  File "C:\Program Files\Python310\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Administrator\Desktop\PythonMemoryModule\pythonmemorymodule\__init__.py", line 556, in execPE
    if not bool(success):
UnboundLocalError: local variable 'success' referenced before assignment```



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

1 participant