0

Hi and hello(this is my first post here!). I'm having this problem:

Traceback (most recent call last):
  File "/Users/apzuba/Documents/Programowanie/FOLDER/Z/TES.py", line 5, in <module>
    from .. import ESE
ImportError: attempted relative import with no known parent package

This is my directory (a test environemnt):

/FOLDER

---ESE.py
---/Z

-----Z/TES.py

This is my code (TES.py):

from .. import ESE
print("gut")

I've tried all options that I could come up with, nothing works (each time there is this error, or

  • "ModuleNotFoundError: No module named 'FOLDER'" if I use "from FOLDER import ESE"
  • "ModuleNotFoundError: No module named 'FOLDER'" if I use "import FOLDER.ESE"
  • "ImportError: attempted relative import with no known parent package" if I use "from ..FOLDER import ESE" or "from .FOLDER import ESE"

I'm stuck with this for over an hour, please help! I will appreciate much!

Adam Zu
  • 1
  • 2

0 Answers0