InterStella0/stella_bot

Error loading parse_find.so

Closed this issue · 6 comments

The file that i built with gcc is there, but it still throws the FileNotFoundError

C:\Users\GOD\Desktop\stella_bot\venv\Scripts\python.exe C:/Users/GOD/Desktop/stella_bot/main.py
Traceback (most recent call last):
  File "C:\Users\GOD\Desktop\stella_bot\main.py", line 11, in <module>
    from utils.useful import StellaContext, ListCall, count_python
  File "C:\Users\GOD\Desktop\stella_bot\utils\useful.py", line 73, in <module>
    lib = ctypes.CDLL("./c_codes/parse_find.so")
  File "C:\Users\GOD\AppData\Local\Programs\Python\Python39\lib\ctypes\__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\Users\GOD\Desktop\stella_bot\c_codes\parse_find.so' (or one of its dependencies). Try using the full path with constructor syntax.

Process finished with exit code 1

image

Where did you compile the c file?

On windows 10, using x64 gcc
image

just provide the full path into ctypes.CDLL

That's what I did

lib = ctypes.CDLL(os.path.abspath("./c_codes/parse_find.so"))

I can't reproduce this, i'm not really sure what's causing your error here.

No, my so files are incompatible with yours in the first place. This really seems like your own problem to be fair since I can't even reproduce it.