Error loading parse_find.so
Closed this issue · 6 comments
opabravo commented
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
InterStella0 commented
Where did you compile the c file?
opabravo commented
InterStella0 commented
just provide the full path into ctypes.CDLL
opabravo commented
That's what I did
lib = ctypes.CDLL(os.path.abspath("./c_codes/parse_find.so"))
InterStella0 commented
I can't reproduce this, i'm not really sure what's causing your error here.
InterStella0 commented
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.