I have created a python class as well as a python script, which is suppossed to call this class.
The entire code lies inside a Code
folder, which contains a Classes
and a Scripts
folder.
The class is stored in:
Classes
> myClass.py
Whereas the script is stored in:
Scripts
> myScript.py
I try to call the class within my script, using:
from ..Classes.myClass import MY_CLASS
Now, the error message that I receive is: ImportError: attempted relative import with no known parent package
I think this is strange, as the two dots should indicate to python that my parent directory is one level up the hierarchy. But apparently I am missing out on sth crucial here. Is there an easy fix to this problem, or do I actually have to include my Classes
folder inside my Scripts
folder?