I am trying to import a Python class from another file but it is not working. I've tried everything posted on relative imports but it is still not working.
My folder hierarchy is as follows:
I need to access the class Victim in victim.py file from test_db_debug.py file.
victim.py
class Victim:
def __init__():
...
test_db_debug.py
import sqlite3
import sys
from code.victim import Victim
When i run the code, i get the error: ModuleNotFoundError: No Module names 'code.victim'; 'code' is not a package.
Can someone please help ?